Home >php教程 >PHP开发 >How to query locked tables in ORACLE and how to unlock and release sessions

How to query locked tables in ORACLE and how to unlock and release sessions

高洛峰
高洛峰Original
2017-01-06 10:40:511467browse

ORACLE EBS operates a certain FORM interface, or when the background database operates a certain table, it is found that it is always in a "suspended death" state. It may be that the table is locked by a certain user, causing other users to be unable to continue the operation

--锁表查询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;

Find the locked table, unlock

--释放SESSION SQL: 
--alter system kill session 'sid, serial#'; 
ALTER system kill session '23, 1647';

For more ORACLE related articles on how to query the locked table and how to unlock and release the session, please pay attention to the PHP Chinese website!

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