--查询锁表
SELECT OBJECT_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;
--释放SESSION SQL:
--alter system kill session 'sid, serial#';
ALTER system kill session '101, 1001';
SELECT OBJECT_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;
--释放SESSION SQL:
--alter system kill session 'sid, serial#';
ALTER system kill session '101, 1001';