SELECT * FROM DBA_2PC_PENDING
oracle 用户:rollback force '71.0.13199'
--看那些事务是死锁状态
SELECT * FROM DBA_2PC_PENDING
rollback force '18.18.116475'
--通过上句查找出已被锁定的数据库表及相关的sid、serial#及spid
select object_name as 对象名称,s.sid,s.serial#,p.spid as 系统进程号
from v$locked_object l , dba_objects o , v$session s , v$process p
where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr;
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1,v$session t2
where t1.session_id=t2.sid order by t2.logon_time;
select sql_text from v$session a,v$sqltext_with_newlines b
where DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_value
and a.sid=&sid order by piece;
alter system kill session '670,10000';