当前位置:网站首页>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';
边栏推荐
- MySQL connection query and subquery
- 傅里叶级数
- On redis (II) -- cluster version
- < job search> process and signal
- [designmode] Prototype Pattern
- SAML2.0 notes (I)
- aaaaaaaaaaaaa
- [HCIA continuous update] working principle of OSPF Protocol
- How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
- venn圖取交集
猜你喜欢
Basic syntax of unity script (6) - specific folder
Verilog state machine
【DesignMode】原型模式(prototype pattern)
Analyse de 43 cas de réseaux neuronaux MATLAB: Chapitre 42 opérations parallèles et réseaux neuronaux - - opérations parallèles de réseaux neuronaux basées sur CPU / GPU
Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
Failed to upgrade schema, error: “file does not exist
Docker installs canal and MySQL for simple testing and implementation of redis and MySQL cache consistency
MySQL advanced (Advanced) SQL statement (II)
蓝桥杯单片机省赛第十二届第一场
一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起
随机推荐
焱融看 | 混合云时代下,如何制定多云策略
傅里叶级数
Gradle notes
Pycharm2021 delete the package warehouse list you added
Uniapp uses canvas to generate posters and save them locally
GSE104154_scRNA-seq_fibrotic MC_bleomycin/normalized AM3
[punch in] flip the string (simple)
Exchange rate query interface
Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
Named block Verilog
"Analysis of 43 cases of MATLAB neural network": Chapter 42 parallel operation and neural network - parallel neural network operation based on cpu/gpu
Detailed explanation of ThreadLocal
Grpc quick practice
Load different fonts in QML
What kind of interview is more effective?
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
h5中的页面显示隐藏执行事件
【DesignMode】原型模式(prototype pattern)
This article describes the step-by-step process of starting the NFT platform project
How to establish its own NFT market platform in 2022