当前位置:网站首页>oracle查看锁表语句、解锁方法
oracle查看锁表语句、解锁方法
2022-07-28 05:16:00 【Ctrl练习生-谢哥哥blog】
一、锁表查看语句
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;
死锁级别:
0:none
1:null 空
2:Row-S 行共享(RS):共享表锁
3:Row-X 行专用(RX):用于行的修改
4:Share 共享锁(S):阻止其他DML操作
5:S/Row-X 共享行专用(SRX):阻止其他事务操作
6:exclusive 专用(X):独立访问使用
二、解锁方法
alter system kill session '68,51'; -- 分别为SID和SERIAL#号
三、查看引起锁表的sql语句
SELECT
A.USERNAME,
A.MACHINE,
A.PROGRAM,
A.SID,
A.SERIAL#,
A.STATUS,
C.PIECE,
C.SQL_TEXT
FROM
V$SESSION A,
V$SQLTEXT C
WHERE
A.SID IN ( SELECT DISTINCT T2.SID FROM V$LOCKED_OBJECT T1, V$SESSION T2 WHERE T1.SESSION_ID = T2.SID )
AND A.SQL_ADDRESS = C.ADDRESS ( + )
ORDER BY
C.PIECE;
边栏推荐
- 面试了一位38岁程序员,听说要加班就拒绝了
- [slam] lvi-sam analysis - Overview
- Database date types are all 0
- Transformer -- Analysis and application of attention model
- 使用nfpm制作rpm包
- PC端-bug记录
- Dell remote control card uses ipmitools to set IPMI
- FreeRTOS startup process, coding style and debugging method
- Clickhouse填坑记2:Join条件不支持大于、小于等非等式判断
- Reading sdwebimage source code Notes
猜你喜欢

【ARXIV2203】Efficient Long-Range Attention Network for Image Super-resolution
![[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme](/img/e3/f9c6bfdbcd5dffd406e3f1d2331050.png)
[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme

MySQL practice 45 lectures

【CPU占用高】software_reporter_tool.exe

MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?

Flink mind map

C language classic 100 question exercise (1~21)

After ruoyi generates the code corresponding to the database, what should I do to make the following image look like

为什么md5不可逆,却还可能被md5免费解密网站解密

Paper reading notes -- crop yield prediction using deep neural networks
随机推荐
在ruoyi生成的对应数据库的代码 之后我该怎么做才能做出下边图片的样子
HDU 3078 network (lca+ sort)
Interpretation of afnetworking4.0 request principle
[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme
[computer level 3 information security] overview of information security assurance
C language: some self realization of string functions
MySQL date and time function, varchar and date are mutually converted
多系统架构设计思考
New methods and features of ES6 built-in objects
HDU 1522 marriage is stable
Share several methods of managing flag bits in C program
After ruoyi generates the code corresponding to the database, what should I do to make the following image look like
面试了一位38岁程序员,听说要加班就拒绝了
2022 summer practice (first week)
regular expression
Online sql to XML tool
Visual studio 2019 new OpenGL project does not need to reconfigure the environment
测试开发---自动化测试中的UI测试
Reading notes of SMT practical guide 1
Duoyu security browser will improve the security mode and make users browse more safely