首页 > 代码库 > Oracle锁表处理操作笔记
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锁表处理操作笔记
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。