Oracle查看哪些表被锁住了


--查看哪些表被锁住了
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;

--查询引起死锁的会话
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;

--查出sid和serial#
select sid,serial#,paddr from v$session where sid = 259;

--查v$process视图,得到spid
select spid from v$process where addr= '00000003E32BDE28';

--杀死进程(sid,serial#)
alter system kill session '259,37152';


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM