当前位置:网站首页>Oracle锁表查询和解锁方法
Oracle锁表查询和解锁方法
2022-04-23 06:05:00 【旺财2】
查看被锁表信息
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;
杀掉锁表进程
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;
版权声明
本文为[旺财2]所创,转载请带上原文链接,感谢
https://blog.csdn.net/wdyliuxingfeiyang/article/details/121610513
边栏推荐
- 异常记录-20
- Relabel of Prometheus_ Configs and metric_ relabel_ Configs explanation and usage examples
- [shell script exercise] batch add the newly added disks to the specified VG
- Redis FAQ
- 解决:You have 18 unapplied migration(s). Your project may not work properly until you apply
- BPF program of type XDP
- Redis practice notes and source code analysis
- Winter combat camp hands-on combat - first understand the cloud foundation, hands-on practice ECS ECS ECS novice on the road to get the mouse cloud Xiaobao backpack shadowless
- Build a cloud blog based on ECS (send blessings on the cloud Xiaobao code and draw iphone13 for free)
- 异常记录-5
猜你喜欢

qs. In the stringify interface, the input parameter is converted into a & connected string (with the application / x-www-form-urlencoded request header)

Chaos vous emmène au projet chaos.

Dolphinscheduler源码包src.tar.gz解压问题

Introduction to RDMA

Chaos takes you to the chaos project quickly

双指针仪表盘读数(一)

Using Prom label proxy to implement label based multi tenant reading of Prometheus thanos

Prometheus的relabel_configs和metric_relabel_configs解释及用法示例

Ali vector library Icon tutorial (online, download)

ACFS文件系统创建扩大缩小等配置步骤
随机推荐
异常记录-15
异常记录-14
Dolphinscheduler调度sql任务建表时The query did not generate a result set异常解决
Information:2021/9/29 10:01 - Build completed with 1 error and 0 warnings in 11s 30ms Error异常处理
ORACLE表有逻辑坏块时EXPDP导出报错排查
Exception record-14
Ansible basic commands, roles, built-in variables and tests judgment
异常记录-6
异常记录-22
Abnormal record-10
19C中ASM network未自动启动的处理
Problems related to Prometheus cortex using block storage
Thanos Compact组件测试总结(处理历史数据)
专用窗口函数rank, dense_rank, row_number
js 函数包裹forEach中使用return跳不出外层函数
EMR Based offline data analysis - polite feedback
Exception record-9
RAC环境集群组件gpnp未启动成功问题分析
[step by step, even thousands of miles] MySQL reports a large number of unauthenticated user connection errors
Oracle RAC数据库实例启动异常问题分析IPC Send timeout