Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to disble to group of triggers

Status
Not open for further replies.

seiamerica

Technical User
Dec 27, 2005
13
US
I need steps to disable triggers starts with 'act' and enable group of triggers starts with lbb

Thanks for your help
 
you can alter the following to your reqs:

select
'Disable Trigger' = 'ALTER TABLE ' + quotename(object_name(parent_obj)) + ' DISABLE TRIGGER ' + quotename([name]),
'Enable Trigger' = 'ALTER TABLE ' + quotename(object_name(parent_obj)) + ' ENABLE TRIGGER ' + quotename([name]),
trigger_name = [name],
trigger_owner = user_name(uid),
isupdate = ObjectProperty( id, 'ExecIsUpdateTrigger'),
isdelete = ObjectProperty( id, 'ExecIsDeleteTrigger'),
isinsert = ObjectProperty( id, 'ExecIsInsertTrigger'),
isafter = ObjectProperty( id, 'ExecIsAfterTrigger'),
isinsteadof = ObjectProperty( id, 'ExecIsInsteadOfTrigger'),
object_name(parent_obj) as 'Parent Table'
from sysobjects
where type = 'TR'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top