Home >Database >Mysql Tutorial >Oracle 解决表锁定的问题

Oracle 解决表锁定的问题

WBOY
WBOYOriginal
2016-06-07 17:17:061096browse

1. 通过v$session,v$locked_object查看谁锁定了资源 select t1.sid, t1.serial#, t1.username, t1.logon_time from v$session t

1. 通过v$session,v$locked_object查看谁锁定了资源

select t1.sid, t1.serial#, t1.username, t1.logon_time

from v$session t1 , v$locked_object t2

where t1.sid = t2.session_id

order by t1.logon_time

2. 通过alter system kill session 'sid, serial#'把session kill掉

alter system kill session '6,8'

linux

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