当前位置:网站首页>Oracle viewing locked tables and unlocking
Oracle viewing locked tables and unlocking
2022-07-02 03:33:00 【Tiantian code code Tiantian】
-- Correlation table
SELECT * FROM v$lock;
SELECT * FROM v$sqlarea;
SELECT * FROM v$session;
SELECT * FROM v$process;
SELECT * FROM v$locked_object;
SELECT * FROM all_objects;
SELECT * FROM v$session_wait;
-- View locked tables
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;
-- View locked table information
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;
-- View that user that process is deadlocked
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;
-- View the process of the connection
SELECT sid, serial#, username, osuser FROM v$session;
-- Of the lock table sid, serial#,os_user_name, machine_name, terminal, The lock type,mode
SELECT s.sid,
s.serial#,
s.username,
s.schemaname,
s.osuser,
s.process,
s.machine,
s.terminal,
s.logon_time,
l.type
FROM v$session s, v$lock l
WHERE s.sid = l.sid
AND s.username IS NOT NULL
ORDER BY sid;
-- This statement will find all... In the database DML Statement , You can also find , whatever DML Statement actually creates two locks , One is the watch lock , One is the row lock .
-- Kill the process sid,serial#
alter system kill session '386,25655';
边栏推荐
猜你喜欢
Retrofit's callback hell is really vulnerable in kotlin synergy mode
NLog使用
汇率的查询接口
How to establish its own NFT market platform in 2022
Verilog timing control
Basic syntax of unity script (6) - specific folder
Halcon image rectification
Verilog 状态机
蓝桥杯单片机省赛第十二届第一场
[untitled] basic operation of raspberry pie (2)
随机推荐
West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
Continuous assignment of Verilog procedure
js生成随机数
aaaaaaaaaaaaa
Named block Verilog
蓝桥杯单片机省赛第十一届
命名块 verilog
Qt的网络连接方式
Verilog 过程赋值 区别 详解
Work hard all day long and be alert at sunset
Global and Chinese market of gynaecological health training manikin 2022-2028: Research Report on technology, participants, trends, market size and share
C#联合halcon脱离halcon环境以及各种报错解决经历
aaaaaaaaaaaaa
This article describes the step-by-step process of starting the NFT platform project
蓝桥杯单片机省赛第十二届第二场
《MATLAB 神经网络43个案例分析》:第42章 并行运算与神经网络——基于CPU/GPU的并行神经网络运算
ORA-01547、ORA-01194、ORA-01110
Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
On redis (II) -- cluster version
Oracle的md5