1. 程式人生 > >oracle 死鎖查詢語句

oracle 死鎖查詢語句

SELECT s.username, l.object_id, l.session_id, s.serial#, l.oracle_username,
       l.os_user_name, l.process,'alter system kill session '''||l.session_id||','|| s.serial#||'''' as killSQL
  FROM v$locked_object l, v$session s
 WHERE l.session_id = s.SID

 

會直接生成解鎖語句 killsql

 

 

 
 alter system kill session '783,30485'   // 第一個session_id, 第二個serial id

 

 

轉載地址  https://blog.csdn.net/lin49940/article/details/4705995