Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Why can't I truncate table?
I want to lock a table to prevent changes, do some read-only
processing on rows in the table, then truncate the table,
and commit, e.g.
I find (Oracle 7.3.3.4) that if another user attempts to insert into xyz after step 1, but before step 3, the truncate fails with:
ORA-00054: resource busy and acquire with NOWAIT specified
The other user's insert then succeeds.
If I 'delete from xyz' instead of 'truncate xyz' it works as expected.
Why can't the process that locks the table in exclusive mode then do a truncate when another process is waiting to insert?
Thanks for your help.
Bill Received on Sun Mar 14 1999 - 10:49:27 CST