Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

disable triggers and lock table

579400Jan 11 2008 — edited Jan 11 2008
Hi,

I have a requirement to update a column in a table without executing the associated triggers on that table. Also, no other session(s) can insert or update data in the table during the update.

I was thinking of doing the following:

ALTER TABLE t
DISABLE ALL TRIGGERS;

LOCK TABLE t IN EXCLUSIVE MODE NOWAIT;

-- perform the UPDATE

ALTER TABLE t
ENABLE ALL TRIGGERS;

Does this guarantee that no data can be updated/inserted during the update or is it possible that between the disabling of the trigger and the locking of the table a session can insert/update data? Or is there a better way to do this ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2008
Added on Jan 11 2008
3 comments
1,701 views