请选择 进入手机版 | 继续访问电脑版

学JAVA网

 找回密码
 立即注册

【转载】解决PLSQL记录被另一个用户锁住的问题

[复制链接]
发表于 2018-5-15 14:29:34 |显示全部楼层

1、查看数据库锁,诊断锁的来源及类型:

select object_id,session_id,locked_mode from v$locked_object;

或者用以下命令:

select b.owner,b.object_name,l.session_id,l.locked_mode from v$locked_object l, dba_objects b where b.object_id=l.object_id

2、找出数据库的serial#,以备杀死:

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;

3、杀死该session:   

alter system kill session 'sid,serial#'



原地址:https://blog.csdn.net/jarniyy/article/details/51133214
您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|学JAVA网

GMT+8, 2018-11-18 10:12 , Processed in 0.164454 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Copyright © 2015-2018 xuejava网 / 鲁ICP备17054568号-1
回顶部