Oracle死锁解决

查看是否有死锁:
    select username,lockwait,status,machine,program from v$session where sid in (select session_id from v$locked_object)
查看谁死锁:
    SELECT s.username,l.OBJECT_ID,l.SESSION_ID,s.SERIAL#, l.ORACLE_USERNAME,l.OS_USER_NAME,l.PROCESS FROM V$LOCKED_OBJECT l,V$SESSION S WHERE l.SESSION_ID=S.SID;
结束死锁进程:
    alter system kill session 'session_id,serial#';

你可能感兴趣的:(oracle,死锁)