Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2000 Triggers


SQL Server 2000 Triggers

Author
Message
thaya2002
thaya2002
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 44
hi,
I am wondering that SQL server 2000 has any facility to disable or enable triggers.

how can we look at disabled triggers in sql server2000?

How can we find which trigger is attached to which table?


when i ran following TSQL in appropriate data base,

SELECT * FROM SYSOBJECTS WHERE TYPE='TR'

i can see the trigger that i am after,but can't see which table it's attached to.

when I right click the table/all tasks/manage triggers and then clicked drop down box to see triggers,i could able to see before,but i can't see now for some known triggers.why?

any help is much appreciated.
thanks in advance

regards,

thaya
arun.sas
arun.sas
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1237 Visits: 3493
--==To find out the all triggers in the DB==--
SELECT
OBJECT_NAME(parent_obj)TbName ,
[name] TrName,
(CASE WHEN (STATUS & 2048) = 2048 THEN 'Disabled' ELSE 'Enabled' END) Status
FROM sysobjects
WHERE xtype = 'TR'
order by 1, 2

--==To find out a selected trigger status in the DB==--
use DB
GO
IF (OBJECTPROPERTY (object_id(<TrName>Wink,'ExecIsTriggerDisabled') = 1)
PRINT 'Trigger disabled'
ELSE
PRINT 'Trigger enabled'


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search