当前位置:网站首页>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;;
边栏推荐
- alibaba jarslink
- Self taught ADT and OOP
- Research Report on the overall scale, major manufacturers, major regions, products and application segments of hydraulic torque in the global market in 2022
- log4j.properties的配置详解
- 和动态规划的第一次相遇
- Operators are also important if you want to learn the C language well
- The R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graph, specifies the grouping parameters with the b
- 巅峰小店APP仿站开发玩法模式讲解源码分享
- Thymeleaf的相关知识
- uni-app开发微信小程序动态渲染页面,动态改变页面组件模块顺序
猜你喜欢

Shell script learning notes

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

mysql学习1:安装mysql

This privatized deployed enterprise knowledge base makes telecommuting a zero distance

StarCraft's Bug King ia retired for 2 years to engage in AI, and lamented that it was inferior

MySQL learning 1: installing MySQL

【粉丝福利】今天给大家介绍一个白捡钱的方法-可转债,本人亲自验证,每年每人能获利1500元

如何修改 node_modules 裏的文件

What is the TCP 3-time handshake process?

pull request
随机推荐
2022ciscn central China Web
Thymeleaf的配置
行业洞察 | 新零售业态下,品牌电商应如何重塑增长?
Topic38——56. 合并区间
Four memory areas (stack, heap, global, code area)
Histrix工作原理
How to participate in openharmony code contribution
Online bidding of Oracle project management system
Private dry goods sharing: how to implement platform in Enterprise Architecture
最短编辑距离(线性dp写法)
Jwas: a Bayesian based GWAS and GS software developed by Julia
How to modify a node_ Files in modules
MySQL learning 1: installing MySQL
Comment modifier Node Fichiers dans les modules
面试突击60:什么情况会导致 MySQL 索引失效?
Basic usage and principle of fork/join framework
Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
On ticheck
build. Gradle configuration
Research Report on the overall scale, major producers, major regions, products and application segments of swine vaccine in the global market in 2022

