oracle死锁查询以及解决办法

 查询死锁

SELECT SESS.SID,
       SESS.SERIAL#,
       LO.ORACLE_USERNAME,
       LO.OS_USER_NAME,
       AO.OBJECT_NAME,
       LO.LOCKED_MODE,
       SESS.MACHINE
FROM V$LOCKED_OBJECT LO,
     DBA_OBJECTS AO,
     V$SESSION SESS
WHERE AO.OBJECT_ID = LO.OBJECT_ID AND LO.SESSION_ID = SESS.SID;

 解决

ALTER SYSTEM KILL SESSION '对应SID,对应SERIAL';

 

你可能感兴趣的:(oracle)