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.
Author |
Topic |
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-07 : 04:37:22
|
Hi,Is there a way to deactivate a trigger and activate them later?or I dont want to my trigger to be executed during some circumstances, like when I run my batch jobs...ThanksKarunakaran |
|
Kristen
Test
22859 Posts |
Posted - 2006-02-07 : 04:46:33
|
ALTER TABLE dbo.MyTable DISABLE TRIGGER ALL...ALTER TABLE dbo.MyTable ENABLE TRIGGER ALLKristen |
 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-07 : 04:56:33
|
quote: Originally posted by Kristen ALTER TABLE dbo.MyTable DISABLE TRIGGER ALL...ALTER TABLE dbo.MyTable ENABLE TRIGGER ALLKristen
Thanks Kristen... For a specific trigger, I guess, I have to the name of that trigger? will it affect other triggers on that table?Karunakaran |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-02-07 : 08:28:31
|
BoL says:ALTER TABLE table { ENABLE | DISABLE } TRIGGER { ALL | trigger_name [ ,...n ] } Kristen |
 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-07 : 08:43:26
|
quote: Originally posted by Kristen BoL says:ALTER TABLE table { ENABLE | DISABLE } TRIGGER { ALL | trigger_name [ ,...n ] } Kristen
Yes, I checked in BOL. ThanksKarunakaran |
 |
|
|
|
|