Home >Database >Mysql Tutorial >ORACLE 如何查询被锁定表及如何解锁释放session

ORACLE 如何查询被锁定表及如何解锁释放session

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:56:07896browse

后台数据库操作某一个表时发现一直出于假死状态,可能是该表被某一用户锁定,接下来为你详细介绍下查询被锁定表及如何解锁,感兴趣的你可以参考下,希望可以帮助到你

ORACLE EBS操作某一个FORM界面,或者后台数据库操作某一个表时发现一直出于"假死"状态,可能是该表被某一用户锁定,导致其他用户无法继续操作
代码如下:
--锁表查询SQLSELECT object_name, machine, s.sid, s.serial#
FROM gv$locked_object l, dba_objects o, gv$session s
WHERE l.object_id = o.object_id
AND l.session_id = s.sid;

找到被锁定的表,解锁
代码如下:
--释放SESSION SQL:
--alter system kill session 'sid, serial#';
ALTER system kill session '23, 1647';
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn