当前位置:网站首页>Dm8: Dameng database - lock timeout
Dm8: Dameng database - lock timeout
2022-06-27 12:22:00 【You are great】
DM8: Daydream database - Lock timeout
1、 Sometimes, the database operation will encounter lock timeout 
1.1 Find the session that caused the block , Commit or roll back transactions , Unblock .
1.2 Close blocked session
SP_CLOSE_SESSION(SESS_ID)
2、 adopt sql Statement to query transactions related to lock timeout / conversation
SELECT
T1.T1_SESS_ID,T1.T1_SQL_TEXT,T1.T1_TRX_ID,
T2.T2_TW_ID,T2_SQL_TEXT,T2_SESS_ID
FROM
(
SELECT
SESS.SESS_ID T1_SESS_ID ,
SESS.SQL_TEXT T1_SQL_TEXT,
TW.ID T1_TRX_ID ,
TW.WAIT_FOR_ID T1_TW_ID
FROM
V$TRXWAIT TW,
V$SESSIONS SESS
WHERE
TW.ID=SESS.TRX_ID
)
T1,
(
SELECT
SESS.SESS_ID T2_SESS_ID ,
SESS.SQL_TEXT T2_SQL_TEXT,
TW.WAIT_FOR_ID T2_TW_ID
FROM
V$TRXWAIT TW,
V$SESSIONS SESS
WHERE
TW.WAIT_FOR_ID=SESS.TRX_ID
)
T2
WHERE
T1.T1_TW_ID=T2.T2_TW_ID
3、 The query results are shown in the figure :
4、 The results specify :
4.1 Display transaction waiting information .
SELECT * FROM V$TRXWAIT;
| order Number | Column | data type | explain |
|---|---|---|---|
| 1 | ID | BIGINT | Business ID |
| 2 | WAIT_FOR_ID | BIGINT | The transaction waiting ID |
| 3 | WAIT_TIME | INTEGER | Current waiting time |

4.2 Show session specific information , If implemented sql sentence 、 Main database name 、 Current session state 、 User name and so on .
SELECT * FROM V$SESSIONS;

4.3 Display active transaction lock information .
SELECT * FROM V$LOCK;;
边栏推荐
- Getting started with go web programming: validators
- Go Web 编程入门:验证器
- Comment modifier Node Fichiers dans les modules
- TiDB 6.0:让 TSO 更高效丨TiDB Book Rush
- Minimum editing distance (linear DP writing method)
- [tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (II)
- yml的配置
- Youboxun attended the openharmony technology day to create a new generation of secure payment terminals
- 聊聊 Go 语言与云原生技术
- The DBSCAN function of FPC package in R language performs density clustering analysis on data, and the plot function visualizes the clustering graph
猜你喜欢

优博讯出席OpenHarmony技术日,全新打造下一代安全支付终端

This privatized deployed enterprise knowledge base makes telecommuting a zero distance

nifi从入门到实战(保姆级教程)——身份认证

MapReduce原理剖析(深入源码)

Shell script learning notes

Operators are also important if you want to learn the C language well

数学知识——博弈论(巴什博奕、尼姆博奕、威佐夫博奕)思路及例题

最短编辑距离(线性dp写法)

动态规划【四】(计数类dp)例题:整数划分

Interview shock 60: what will cause MySQL index invalidation?
随机推荐
AI for Science:科研范式、开源平台和产业形态
Four memory areas (stack, heap, global, code area)
Building crud applications in golang
pull request
【On nacos】快速上手 Nacos
一个有趣的网络掩码的实验
log4j的详情配置
hibernate操作oracle数据库 主键自增
【粉丝福利】今天给大家介绍一个白捡钱的方法-可转债,本人亲自验证,每年每人能获利1500元
mysql学习1:安装mysql
How histrix works
StarCraft's Bug King ia retired for 2 years to engage in AI, and lamented that it was inferior
【面试高频题】难度 1.5/5,LCS 模板题
记一次 .NET 某物管后台服务 卡死分析
自定义多线程基类threading.Event
In 2021, the global professional liability insurance revenue was about USD 44740million, and it is expected to reach USD 55980million in 2028. From 2022 to 2028, the CAGR was 3.5%
和动态规划的第一次相遇
MapReduce实战小案例(自定义排序、二次排序、分组、分区)
build. Gradle configuration
Hibernate operation Oracle database primary key auto increment

