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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-07-15 : 10:25:29
|
| charmaine writes "How to check whether a trigger is enabled/disabled?" |
|
|
rlahoty
Starting Member
11 Posts |
Posted - 2004-07-15 : 12:56:52
|
| Try this:select objectproperty(object_id('trigger_name'), 'ExecIsTriggerDisabled')This will return 0 if it is enabled and 1 if it is disabled.HTH-Rajeev Lahoty |
 |
|
|
maodou
Starting Member
5 Posts |
Posted - 2004-07-19 : 02:45:35
|
| what is trigger_name?it exitst?only test,have bug |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-19 : 08:12:30
|
| trigger_name is the name of the trigger. ????You have a trigger on Properties for example called tr_properties_ins.You would type:select objectproperty(object_id('tr_properties_ins'), 'ExecIsTriggerDisabled')to get the property of the trigger.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|