Oracle锁表处理操作笔记
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle锁表处理操作笔记相关的知识,希望对你有一定的参考价值。
--查看锁表进程SQL语句1:
SELECT sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode FROM v$locked_object lo, dba_objects ao, v$session sess WHERE ao.object_id = lo.object_id AND lo.session_id = sess.sid;
或者
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;
---查看锁表进程SQL语句2:
SELECT * FROM v$session t1, v$locked_object t2 WHERE t1.sid = t2.SESSION_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;
--查看数据库连接进程
SELECT sid, serial#, username,osuser FROM v$session;
--杀掉锁的进程 sid,serial#
ALTER SYSTEM KILL SESSION ‘sid,serial‘;
以上是关于Oracle锁表处理操作笔记的主要内容,如果未能解决你的问题,请参考以下文章