-
The lock table query code has the following form:
select count(*) from v$locked_object; select * from v$locked_object;
-
See which table is locked
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
-
Check which session caused
select a.OS_USER_NAME, c.owner, c.object_name, b.sid, b.serial#, logon_time from v$locked_object a, v$session b, dba_objects c where a.session_id = b.sid and a.object_id = c.object_id order by b.logon_time;
-
Kill the corresponding process
执行命令:alter system kill session '1025,41'; 需要用户有权限操作 其中1025为sid,41为serial#.
How to unlock the Oracle database after locking the table
Guess you like
Origin blog.csdn.net/weixin_44146509/article/details/108826061
Ranking