May 13, 2008 at 4:40 pm
Hi,
I want to disable triggers which I found using this .
select text from syscomments
where text like '%GLPaudit%'
Thanks,
-V
May 14, 2008 at 12:19 am
disable trigger "full name of trigger"
on "object" --this can be a table/database/server etc
you can also disable a DML trigger using the following
alter table "your table"
disable trigger "full name of trigger"
May 14, 2008 at 9:16 am
Hi,
I wanted to know disable all triggers at once, which had text like GLPAudit, not individually. Using dynamic sql it may be possible I guess..But I don't know much dynamic sql...
Thanks,
-V
May 14, 2008 at 9:27 am
you could run the following query into a temp table and then loop through it disabling the triggers one at a time
select name,parent_id from sys.triggers where name like '%GLPAudit%'
From the parent_id you can do object_name('object') to get the name of the table to put in your alter table statement.
May 15, 2008 at 9:42 am
Hi,
How to find triggers assosiated with a table ?
Thanks again..
-V
May 15, 2008 at 9:48 am
select name from sys.triggers where parentid = object_id('yourtable')
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply