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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 execute a query without fireing triggers - how?

Author  Topic 

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-17 : 04:47:44
Hello,

I would like to execute a sql-query on a table, but disable the triggers that whould fire on the change.

Thank you for telling me how to do this!

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-17 : 13:14:01
[code]
-- Disable/enable a trigger on a table
alter table MyTable disable trigger MyTrigger
alter table MyTable enable trigger MyTrigger

-- Disable/enable all triggers on a table
alter table MyTable disable trigger all
alter table MyTable enable trigger all

[/code]

CODO ERGO SUM
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2006-06-17 : 14:40:23
Hello Michael,

thank you very much for your help!

Regards,
Fabian

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page
   

- Advertisement -