-
Disabling Triggers
There is an UPDATE trigger on a table. When an update is made to a record, the trigger copies the record to another table.
I'd like to update this table for a few records, but I do not want the trigger to be fired for just these few records. How do I do this without:
1. Disabling the trigger, meaning all other updates will be impacted
2. Modifying the trigger (code change)
3. Requiring down time
Since this is an OLTP database, I just want to make updates to a few records without firing the trigger, but I would like all other updates which occur at the same time to fire the trigger.
Is there a command where:
<DISABLE TRIGGER FOR QUERY BELOW ONLY>
UPDATE Table
SET x = y
WHERE ID IN (1,2,3)
-
-
Sorry... it's SQL Server 2005
-
Then you can't disable trigger for specific process.
-
write another trigger for update that will delete all the rows from table2 for specific condition
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|