1.死锁的查看:
SELECT s.username, decode(l.type,'TM','TABLE LOCK', 'TX','ROW LOCK', NULL)
LOCK_LEVEL,
o.owner,o.object_name,o.object_type,
'['||s.sid,s.serial#||']',s.terminal,s.machine,s.program,s.osuser
FROM v$session s,v$lock l,dba_objects o
WHERE l.sid = s.sid
AND l.id1 = o.object_id(+)
AND s.username is NOT Null
2. 死锁的处理:
根据上面的sql语句查询到sid,serial后,按照如下格式处理:
alter system kill session 'sid,serial#';
例如:alter system kill session '242,38283';