Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trigger and update

Author  Topic 

Rita Bhatnagar
Posting Yak Master

172 Posts

Posted - 2002-03-15 : 15:28:09
How do we disable triggers and enable them again?
I had to update one table manually that has two after update triggers
and sql server didn't allow me to update table.
I had to remove triggers and had to put them back after update.
First question is that why it was not allowed?
my sql statement was
update table set ownerid=reportId.
Second question : can we disable triggers and enable them again?
I have 2k sql server.

joldham
Wiseass Yak Posting Master

300 Posts

Posted - 2002-03-15 : 15:39:06
Found this is BOL under Disable Trigger

"Note Removing a trigger using the Trigger object completely removes its definition from an instance of SQL Server. SQL Server triggers can be disabled but remain defined; that is, an instance of SQL Server maintains the trigger text, but the trigger does not fire on data modification. Trigger execution can be enabled or disabled using SQL-DMO using the Enabled property of the referencing Trigger object. For more information, see Enabled Property."

Not sure if this will help or not.

Jeremy



Go to Top of Page
   

- Advertisement -