当前位置:网站首页>达梦数据库如何定位锁等待问题解决方法
达梦数据库如何定位锁等待问题解决方法
2022-06-24 08:14:00 【牛排煎黑椒】
定位锁等待问题
查看被挂起的事务(TRX_ID)
SELECT VTW.ID AS TRX_ID, VS.SESS_ID ,VS.SQL_TEXT,VS.APPNAME ,VS.CLNT_IP FROM V T R X W A I T V T W L E F T J O I N V TRXWAIT VTW LEFT JOIN V TRXWAITVTWLEFTJOINVTRX VT ON
(VTW.ID=VT.ID) LEFT JOIN V$SESSIONS VS ON (VT.SESS_ID=VS.SESS_ID);
通过挂起事务ID(TRX_ID)找到它等待的事务(WAIT_FOR_ID)。
SELECT WAIT_FOR_ID,WAIT_TIME FROM V$TRXWAIT WHERE ID=321646;
通过等待事务ID(WAIT_FOR_ID)定位到连接以及执行的语句
SELECT VT.ID AS TRX_ID,VS.SESS_ID,VS.SQL_TEXT ,VS.APPNAME,VS.CLNT_IP FROM
V T R X V T L E F T J O I N V TRX VT LEFT JOIN V TRXVTLEFTJOINVSESSIONS VS ON (VT.SESS_ID=VS.SESS_ID) WHERE
VT.ID = 321643;
SP_CLOSE_SESSION关闭等待事务(SESS_ID)
SP_CLOSE_SESSION(142344256);
另一种查找锁等待的方式
select * from v t r x w a i t ; s e l e c t ∗ f r o m v trxwait; select * from v trxwait;select∗fromvlock t where t.blocked =1;
select a.sess_id, a.sql_text, a.state, b.* from v s e s s i o n s a , v sessions a, v sessionsa,vtrxwait b
where a.trx_id = b.id;
select a.trx_id,a.* from v$sessions a;
commit;
select * from sys.sysobjects t where id= 1069;
sp_close_session(131853344); --结束某个会话
边栏推荐
- PHP封装一个文件上传类(支持单文件多文件上传)
- 【Redis實現秒殺業務①】秒殺流程概述|基本業務實現
- [use picgo+ Tencent cloud object to store cos as a map bed]
- MySQL - SQL statement
- 金仓KFS replicator安装(Oracle-KES)
- Learn Tai Chi Maker - esp8226 (12) esp8266 multitasking
- Support vector machine (SVC, nusvc, linearsvc)
- When to use RDD and dataframe/dataset
- leetcode--字符串
- 零基础自学SQL课程 | 相关子查询
猜你喜欢

The border problem after the focus of input

Squid proxy application

The list of open source summer winners has been publicized, and the field of basic software has become a hot application this year

When programmers are asked if they can repair computers... | daily anecdotes

2022-06-23: given a nonnegative array, select any number to make the maximum cumulative sum a multiple of 7, and return the maximum cumulative sum. N is larger, to the 5th power of 10. From meituan. 3

NETRCA: AN EFFECTIVE NETWORK FAULT CAUSE LOCALIZATION之论文阅读

MySQL data (Linux Environment) scheduled backup

Redis implements a globally unique ID

【gdb调试工具】| 如何在多线程、多进程以及正在运行的程序下调试

CF566E-Restoring Map【bitset】
随机推荐
正则匹配手机号
Mba-day25 best value problem - application problem
关于thinkphp5 使用模型save()更新数据提示 method not exist:think\db\Query-> 报错解决方案
Xiaobai needs to learn MySQL - incremental statistical SQL
Target detection series fast r-cnn
Leetcode -- linked list
获取带参数的微信小程序二维码-以及修改二维码LOGO源码分享
每周推荐短视频:计算的终极形态是“元宇宙”?
When programmers are asked if they can repair computers... | daily anecdotes
支持向量机(SVC,NuSVC,LinearSVC)
The native applet uses canvas to make posters, which are scaled to the same scale. It is similar to the uniapp, but the writing method is a little different
牛客网 实现简单计算器功能
ThinkPHP5多语言切换项目实战
学习太极创客 — ESP8226 (十二)ESP8266 多任务处理
Learning Tai Chi Maker - esp8226 (XIII) OTA
【Redis实现秒杀业务①】秒杀流程概述|基本业务实现
深入了解 border
Unable to change the virtual machine power status and report an error solution
Webrtc series - network transmission 5: select the optimal connection switching
可直接套用的Go编码规范