oracle 死锁处理办法


select username,lockwait,status,machine,program from v$session where sid 
in (select session_id from v$locked_object)

select sql_text from v$sql where hash_value in 
(select sql_hash_value from v$session where sid in
(select session_id from v$locked_object))


  select sid,blocking_session,event,status,module,action,client_info,client_identifier FROM v$session where blocking_session is not null  ;
  
  select * from v$session where sid='1002';
  
  alter system kill session '1002,54506'
  
  SELECT   sql_text,sql_id,HASH_VALUE
    FROM v$sqltext a
   WHERE a.hash_value = (SELECT sql_hash_value
                           FROM v$session b
                          WHERE b.SID = '1002')  --1052  986
                          ORDER BY piece ASC

你可能感兴趣的:(oracle)