当前位置:网站首页>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';
边栏推荐
- venn图取交集
- Kotlin basic learning 15
- [HCIA continuous update] working principle of OSPF Protocol
- Competition and adventure burr
- 终日乾乾,夕惕若厉
- Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
- Work hard all day long and be alert at sunset
- Intersection of Venn graph
- MySQL index, transaction and storage engine
- Kotlin基础学习 17
猜你喜欢

Verilog parallel block implementation

知物由学 | 自监督学习助力内容风控效果提升

傅里叶级数

蓝桥杯单片机省赛第十一届

Pycharm2021 delete the package warehouse list you added

【DesignMode】建造者模式(Builder model)

Docker installs canal and MySQL for simple testing and implementation of redis and MySQL cache consistency

"Analysis of 43 cases of MATLAB neural network": Chapter 41 implementation of customized neural network -- personalized modeling and Simulation of neural network

Continuous assignment of Verilog procedure
![[designmode] Prototype Pattern](/img/ee/c4e48c2ce8ff66f50f0bf13e5a0418.png)
[designmode] Prototype Pattern
随机推荐
高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
Kubernetes cluster storageclass persistent storage resource core concept and use
蓝桥杯单片机省赛第十二届第一场
This article describes the step-by-step process of starting the NFT platform project
Kotlin 基础学习13
West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
C#聯合halcon脫離halcon環境以及各種報錯解决經曆
[designmode] builder model
Account management of MySQL
Exchange rate query interface
IPhone 6 plus is listed in Apple's "retro products" list
Unity脚本的基础语法(6)-特定文件夹
【DesignMode】原型模式(prototype pattern)
Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
【DesignMode】建造者模式(Builder model)
Screenshot literacy tool download and use
In depth interpretation of pytest official documents (26) customized pytest assertion error information
Global and Chinese market of bone adhesives 2022-2028: Research Report on technology, participants, trends, market size and share