1. 程式人生 > >ORACLE 如何查詢被鎖定表及如何解鎖釋放session

ORACLE 如何查詢被鎖定表及如何解鎖釋放session

一:
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;  and o.object_name='XXX'


二:
--alter system kill session 'sid, serial#'; 
ALTER system kill session '507, 1647';