当前位置:网站首页>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';
边栏推荐
- JIT deep analysis
- 【DesignMode】原型模式(prototype pattern)
- ThreadLocal详解
- Introduction to Robotics II. Forward kinematics, MDH method
- West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
- "Analysis of 43 cases of MATLAB neural network": Chapter 42 parallel operation and neural network - parallel neural network operation based on cpu/gpu
- Unity脚本的基础语法(6)-特定文件夹
- PHP array processing
- UI (New ui:: MainWindow) troubleshooting
- On redis (II) -- cluster version
猜你喜欢
Detailed explanation of ThreadLocal
傅里叶级数
Verilog parallel block implementation
蓝桥杯单片机省赛第十二届第一场
[HCIA continuous update] working principle of OSPF Protocol
Halcon image rectification
What do you know about stock selling skills and principles
Retrofit's callback hell is really vulnerable in kotlin synergy mode
Verilog avoid latch
Screenshot literacy tool download and use
随机推荐
Docker installs canal and MySQL for simple testing and implementation of redis and MySQL cache consistency
Verilog 过程赋值 区别 详解
Verilog state machine
[designmode] builder model
ImageAI安装
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
《MATLAB 神經網絡43個案例分析》:第42章 並行運算與神經網絡——基於CPU/GPU的並行神經網絡運算
C#联合halcon脱离halcon环境以及各种报错解决经历
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
[数据库]JDBC
Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
halcon图像矫正
跟着CTF-wiki学pwn——ret2shellcode
aaaaaaaaaaaaa
Screenshot literacy tool download and use
MySQL advanced (Advanced) SQL statement (II)
Form custom verification rules
Verilog wire type
Sentry experience and architecture, a fledgling monitoring product with a market value of $100million
What kind of interview is more effective?