摘要:[Oracle]顯示Deadlock的Session(會顯示語法)
select
a.username,
a.machine,
a.sid,
a.serial#,
a.last_call_et "Seconds",
b.id1,
c.sql_text "SQL"
from v$session a, v$lock b, v$sqltext c
where a.username is not null
And A.Lockwait = B.Kaddr
and c.hash_value = a.sql_hash_value;