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 |
|
zakwithu
Starting Member
8 Posts |
Posted - 2009-09-30 : 05:32:18
|
Hi All,I know how to enable/disable triggers. just use this code like this:ALTER TABLE YourTable DISABLE TRIGGER ALLandALTER TABLE YourTable ENABLE TRIGGER ALL but how i know the trigger state is its enabled or disabled?is there any sys variable contains this information?thx, |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-30 : 05:39:30
|
| SELECT OBJECTPROPERTY(OBJECT_ID('trigger_name'), 'ExecIsTriggerDisabled')If the result is 1, it is disabled else enabledMadhivananFailing to plan is Planning to fail |
 |
|
|
zakwithu
Starting Member
8 Posts |
Posted - 2009-09-30 : 05:52:46
|
quote: Originally posted by madhivanan SELECT OBJECTPROPERTY(OBJECT_ID('trigger_name'), 'ExecIsTriggerDisabled')If the result is 1, it is disabled else enabledMadhivananFailing to plan is Planning to fail
thank you it works fine |
 |
|
|
|
|
|