Oracle 死锁查询与解锁

  1. 死锁查询
    select c.session_id, b.SERIAL#, username,lockwait,status,machine,program,logon_time from
    v s q l a , v sql a, v sqla,vsession b, v$locked_object c
    where a.HASH_VALUE = b.sql_hash_value and b.sid = c.SESSION_ID;

    select sid, username, status, schemaname, osuser, process, machine, program, prev_exec_start, module, logon_time, seq#, p1text from v$session
    where status = ‘ACTIVE’ and prev_exec_start is not null
    order by prev_exec_start desc;

  2. Kill Session
    alter system kill session ‘766, 54’; – c.seesion_id, b.serial#

你可能感兴趣的:(Oracle,Oracle)