殺死Oracle死鎖程式

elevenxl發表於2008-09-27
很多人應該都遇到多ORACLE程式死鎖的情況,下面是兩個簡單的SQL,來殺死死鎖程式:
--Sep27, 2008 Eleven.Xu
--Select Locked Process
SELECT s.username,
       l.OBJECT_ID,
       o.name,
       l.SESSION_ID,
       s.SERIAL#,
       l.ORACLE_USERNAME,
       l.OS_USER_NAME,
       l.PROCESS
  FROM V$LOCKED_OBJECT l, V$SESSION S,sys.obj$ o
 WHERE l.SESSION_ID = S.SID
   AND o.obj# = l.OBJECT_ID;

--Sep27, 2008 Eleven.Xu
--Kill Locked Process
alter system kill session 'sid,serial#';

相關文章