oracle 查看锁表情况与解表
CreateTime--2018年4月27日17:24:37
Author:Marydon
1.锁表查询
--锁表查询
SELECT OBJECT_NAME AS TABLE_NAME, MACHINE, S.SID, S.SERIAL#
FROM GV$LOCKED_OBJECT L, DBA_OBJECTS O, GV$SESSION S
WHERE L.OBJECT_ID = O.OBJECT_ID
AND L.SESSION_ID = S.SID;
2.解表
--释放SESSION SQL
--ALTER SYSTEM KILL SESSION 'sid, serial';
ALTER SYSTEM KILL SESSION '1916, 19637';
3.效果展示