当前位置:网站首页>oracle常见锁表处理方式
oracle常见锁表处理方式
2022-07-07 09:06:00 【auspicious航】
1、查看被锁表信息
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;
2、杀掉锁表进程
alter system kill session '68,51';--分别为SID和SERIAL#号
3、查看数据库引起锁表的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;
边栏推荐
- Arduino board description
- Compile QT project script with qmake
- verilog设计抢答器【附源码】
- 从色情直播到直播电商
- 在线硬核工具
- Force buckle 1002 Find common characters
- 單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
- The use of list and Its Simulation Implementation
- Some online academic report websites and machine learning videos
- [untitled]
猜你喜欢
随机推荐
2021-04-08
Input type= "password" how to solve the problem of password automatically brought in
Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine
Transaction rolled back because it has been marked as rollback only
[C #] the solution of WinForm operation zoom (blur)
【OneNote】无法连接到网络,无法同步问题
Rolling puddle Uni_ App (VIII)
请问申购新股哪个证券公司开户是最好最安全的
Go slice comparison
90后,辞职创业,说要卷死云数据库
SQL Server knowledge gathering 9: modifying data
Unity downloads files through the server address
Process control (creation, termination, waiting, program replacement)
Use of dotween
A simple example of delegate usage
[STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)
Project ERROR: Unknown module(s) in QT: core gui
Typescript interface inheritance
Unity script generates configurable files and loads
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer