oracle中“ORA-00060: 等待资源时检测到死锁 解决方法
之前在调试存储过程时,出现卡死情况,无法插入数据
一、查看那些表被锁住:
–1、查看那些表被锁住–
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
二、查看引起死锁的会话:
–2、查看引起死锁会话–
select b.username,b.sid,b.serial#,logon_time from v
l
o
c
k
e
d
o
b
j
e
c
t
a
,
v
locked_object a,v
lockedobjecta,vsession b where a.session_id = b.sid order by b.logon_time;
三、查看被阻塞的会话::
–3、查看被阻塞的会话–
select * from dba_waiters;
四、释放锁或者杀掉ORACLE进程:
–4、释放锁或者杀掉Oracle进程–
alter system kill session ‘sid,serial#’;
具体情况根据每个人情况不一样,sid,serial#的值也不一样
相关文章
暂无评论...