Method: 1. Use "select...from v$locked_object,v$session..." to view the sid and "serial#" of the locked table; 2. Use "alter system kill session 'sid" ,serial#" delete the locked table.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
1. Check the sid and serial# of the locked table:
Check which table is locked Lock:
The example is as follows
select b.owner,b.object_name,l.session_id,l.locked_mode from v$locked_object l, dba_objects b where b.object_id=l.object_id;
View the sid and serial of the locked table
#select...from v$locked_object ,v$session
As shown in the figure:
2. Execute the following statement to delete the locked table
alter system kill session 'sid,serial#';## Recommended tutorial: "
Oracle Video Tutorial 》
The above is the detailed content of How to delete a locked table in Oracle. For more information, please follow other related articles on the PHP Chinese website!