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
 Transact-SQL (2000)
 Disable Trigger in SQL2000

Author  Topic 

btamulis
Yak Posting Veteran

64 Posts

Posted - 2010-12-20 : 20:32:06
I have a table that a previous consultant created an SQL trigger on. I noticed that in SQL2005 - I can right click and 'disable' any SQL trigger. I need to perform some SQL work and disable this trigger temporarily.

What is the prescribed protocol in SQL2000? I don't see a disable option.

Do I have to save the script - delete the trigger and then re-create?

Thanks in advance.........

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-20 : 20:43:11
ALTER TABLE yourTable DISABLE TRIGGER triggerName;
Go to Top of Page

btamulis
Yak Posting Veteran

64 Posts

Posted - 2010-12-20 : 21:38:29
Thanks Russell.

Logically, to enable will be:

ALTER TABLE yourTable ENABLE TRIGGER triggerName

I will need to re-enable the trigger........Thanks again
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-20 : 21:58:10
Correct.

Glad to help :)
Go to Top of Page
   

- Advertisement -