ORACLE存在的死锁会话

1: 死锁:dead lock

alert中报警:
×××× ××××××
ORA-000060: Deadlock detected. More info in file /oraclelog/udump/qmcccx_ora_1049.trc

trace文件中有些解释,这里是提示应用问题:
×××××××××
DEADLOCK DETECTED
Current SQL statement for this session:
导致死锁的SQL语句
----- PL/SQL Call Stack -----
object line object
handle number name
3f2390028 126 procedure #¥◎
3f226b558 1 anonymous block
The following deadlock is not an ORACLE error. It is a
deadlock due to user error in the design of an application
or from issuing incorrect ad-hoc SQL. The following
information may aid in determining the deadlock:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-00070081-000022ea 40 19 X 39 14 X
TX-00060080-000022d0 39 14 X 40 19 X

2:查锁定的对象

select object_id,session_id,locked_mode from v$locked_object;

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 t1.object_name,t2.session_id,t2.locked_mode
from dba_objects t1,v$locked_object t2
where t1.object_id=t2.object_id;


select t3.object_name,T3.object_type,t2.username,t2.sid,t2.serial#,
t2.logon_time
from dba_objects t3,v$locked_object t1,v$session t2
where t1.session_id=t2.sid
and t3.object_id=t1.object_id order by t2.logon_time;

确认的话,就可以
alter system kill session (sid,serial#);
把会话干掉
或者
kill -9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值