来源 http://blog.sina.com.cn/s/blog_4a93ccea0102e7zj.html
(1)以sys用户登陆数据库查询死锁:
SQL> select username,lockwait,status,machine,program from v$session where sid in
(2)然后使用一下语句查找被死锁的语句
SQL> select sql_text from v$sql where hash_value in
(3)再使用以下语句查找被死锁的进程
SQL> SELECT s.username,l.OBJECT_ID,l.SESSION_ID,s.SERIAL#,
(4)使用一下语句把死锁的进程kill
SQL>alter system kill session ‘sid,serial#’; (其中sid=l.session_id)
如:SQL> alter system kill session '24,37522';