之前在调试存储过程时,出现卡死情况,无法插入数据
解决方法
1、查看那些表被锁住:
--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、查看引起死锁的会话:
--3、查看引起死锁会话-- select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
3、查看被阻塞的会话:
--3、查看被阻塞的会话-- select * from dba_waiters;
4、释放锁或者杀掉ORACLE进程:
--4、释放锁或者杀掉Oracle进程-- alter system kill sessin ‘sid,serial#‘;
具体情况根据每个人情况不一样,sid,serial#的值也不一样
参考来源:https://blog.csdn.net/haojiubujian920416/article/details/81876647
原文地址:https://www.cnblogs.com/xielong/p/10716640.html
时间: 2024-10-16 15:03:20