当前位置:网站首页>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';
边栏推荐
猜你喜欢

uniapp 使用canvas 生成海报并保存到本地
![[C Advanced] brother Peng takes you to play with strings and memory functions](/img/95/ab1bb0b3fa0b99e32233a5ca5d42a4.jpg)
[C Advanced] brother Peng takes you to play with strings and memory functions

傅里叶级数

汇率的查询接口

This article describes the step-by-step process of starting the NFT platform project

Continuous assignment of Verilog procedure

Generate random numbers that obey normal distribution
![[designmode] builder model](/img/e8/855934d57eb6868a4d188b2bb1d188.png)
[designmode] builder model
![[mv-3d] - multi view 3D target detection network](/img/aa/741b36ead2dfaa5a165401b8d657b7.jpg)
[mv-3d] - multi view 3D target detection network

Pointer array & array pointer
随机推荐
One of the future trends of SAP ui5: embrace typescript
Form custom verification rules
venn圖取交集
What is the logical structure of database file
Unity脚本的基础语法(7)-成员变量和实例化
流线线使用阻塞还是非阻塞
Basic syntax of unity script (8) - collaborative program and destruction method
数据库文件逻辑结构形式指的是什么
Oracle 查看被锁的表和解锁
Qt的网络连接方式
Global and Chinese market of autotransfusion bags 2022-2028: Research Report on technology, participants, trends, market size and share
On redis (II) -- cluster version
PY3 link MySQL
Gradle notes
Unity脚本的基础语法(6)-特定文件夹
Pycharm2021 delete the package warehouse list you added
Grpc quick practice
Kotlin basic learning 16
Go执行shell命令
Framing in data transmission