(1) query deadlock with SYS user Login database:
Sql> Select Username,lockwait,status,machine,program from v$session where SID in (select session_id from V$locked_obje CT);
(2) Then use the statement to find the dead lock statement
Sql> 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));
(3) Then use the following statement to find the deadlock process
Sql> 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;
(4) According to the SID, Serial# found in step (3), use the following statement to kill the deadlock process
Sql>alter system kill session ' Sid,serial '; (where sid=l.session_id)
"ORA-02049" timed out Distributed transaction processing wait Lock resolution method