简体   繁体   中英

ORA-00054 error when trying to delete table

When I try this command on oracle sql-developer :

delete from my_table;

I get the following error :

ORA-00054: resource busy and acquire with NOWAIT specified

I haven't figured out how to solve this problem.

Someone or yourself(unintentionally) has a lock on the table. Query the table V$LOCKED_OBJECTS to find the name of the user (you would want OS_USER_NAME ) locking it.

You can ask the user to unlock the table. They will have to either commit/rollback their transaction. If they are unable to do so and permit you to kill their session, you can use the below:

alter system kill session 'sid, serial#'

to kill their session which has a lock on your table where ' sid ' & ' serial# ' is something you have to find by querying v$session , v$sqlarea tables.

This can also be done in SQL developer, you can find out the session (if your user has access to meta tables) from the menu Tools --> Monitor Sessions Right click on the correct session record (very important) and select mark for kill. You should be able to delete the records once the session is killed.

Check with database admin. They can check if anything is going on with the table. May be someone is performing something on the table in different session. Admin can kill the session. Then, you will be able to delete/truncate the table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM