当前位置:网站首页>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;
边栏推荐
- Clickhouse填坑记2:Join条件不支持大于、小于等非等式判断
- 11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
- Why is MD5 irreversible, but it may also be decrypted by MD5 free decryption website
- 【CVPR2022】Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
- The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
- 面试了一位38岁程序员,听说要加班就拒绝了
- Internal implementation principle of yymodel
- HDU 1530 maximum clique
- 【ARXIV2205】Inception Transformer
- Tips for using swiper (1)
猜你喜欢

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

Driving the powerful functions of EVM and xcm, how subwallet enables Boca and moonbeam

Duoyu security browser will improve the security mode and make users browse more safely

微服务故障模式与构建弹性系统

MySQL practice 45 lectures

【CPU占用高】software_reporter_tool.exe

11.< tag-动态规划和子序列, 子数组>lt.115. 不同的子序列 + lt. 583. 两个字符串的删除操作 dbc

【CVPR2022】Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
![[internal mental skill] - creation and destruction of function stack frame (C implementation)](/img/a9/81644ee9ffb74a5dc8ff1bc3977f49.png)
[internal mental skill] - creation and destruction of function stack frame (C implementation)
![[slam] lvi-sam analysis - Overview](/img/66/f15f6f574807b9a783e9321c71d422.png)
[slam] lvi-sam analysis - Overview
随机推荐
regular expression
类和对象【中】
Activation functions sigmoid, tanh, relu in convolutional neural networks
Printf function of input and output function in C language
MySQL basic query
凛冬已至,程序员该怎么取暖
Data security is gradually implemented, and we must pay close attention to the source of leakage
7. < tag string and API trade-offs> supplement: Sword finger offer 05. replace spaces
POJ 2763 housewife wind (tree chain partition + edge weighting point weight)
Struct模块到底有多实用?一个知识点立马学习
Database date types are all 0
Keil Chinese garbled code solution
HDU 1530 maximum clique
The research group passed the thesis defense successfully
【计算机三级信息安全】信息安全保障概述
HDU 1522 marriage is stable
FreeRTOS personal notes - task notification
First acquaintance with C language (2)
What is the reason why the easycvr national standard protocol access equipment is online but the channel is not online?
HDU 2874 connections between cities