1.查询被锁的会话ID:

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;

查询结果:SESSION_ID-------5213 5570
2.查询上面会话的详细信息:


SELECT B.USERNAME, B.SID, B.SERIAL#, LOGON_TIME
FROM V$LOCKED_OBJECT A, V$SESSION B
WHERE A.SESSION_ID = B.SID
ORDER BY B.LOGON_TIME;

 

3.将上面锁定的会话关闭:

ALTER SYSTEM KILL SESSION '5570,57138';

 

posted on 2018-11-05 23:18  donghongbo  阅读(592)  评论(0编辑  收藏  举报