Subject | Bypass a trigger? |
---|---|
Author | Joe Martinez |
Post date | 2005-03-13T19:26:17Z |
A couple questions...
1) Is there a way to do an insert/update/delete and bypass a trigger
(prevent it from firing), other than deactivating the trigger?
2) If deactivating the trigger is the only way, can I do this:
Start a transaction
Deactivate the triggers
Do my inserts/updates/deletes
Reactivate the triggers
Commit the transaction
And will the deactivation ONLY affect the inserts/updates/deletes that
happen within this transaction? In other words, will
inserts/updates/deletes performed by other
applications/clients/transactions continue to execute the triggers while
this transaction has them deactivated if I reactivate them before committing?
3) If #2 doesn't work, is there any other way to do what I want (do some
work w/o triggers firing, without affecting other applications)?
-Joe
1) Is there a way to do an insert/update/delete and bypass a trigger
(prevent it from firing), other than deactivating the trigger?
2) If deactivating the trigger is the only way, can I do this:
Start a transaction
Deactivate the triggers
Do my inserts/updates/deletes
Reactivate the triggers
Commit the transaction
And will the deactivation ONLY affect the inserts/updates/deletes that
happen within this transaction? In other words, will
inserts/updates/deletes performed by other
applications/clients/transactions continue to execute the triggers while
this transaction has them deactivated if I reactivate them before committing?
3) If #2 doesn't work, is there any other way to do what I want (do some
work w/o triggers firing, without affecting other applications)?
-Joe