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

高洛峰
Release: 2017-01-06 10:40:51
Original
1493 people have browsed it

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;
Copy after login

Find the locked table, unlock

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template