忙裏偷閑

很多事情很多心情寫了也就記下了; 不寫,以後可能就忘了.
個人資料
正文

Check and release lock on tables

(2010-10-06 08:39:43) 下一個
Good queries to keep here.

To check the existing locked create dby a user:
select a.object_name, b.oracle_username, b.os_user_name,c.sid, c.serial#,c.terminal, d.sql_text
from sys.dba_objects a,
v$locked_object b,
v$session c,
v$sqltext d
where a.object_id = b.object_id
and c.sid = b.session_id
and c.sql_hash_value = d.hash_value;

To remove the lock by killing a session:
alter system kill session 'c.sid, c.serial#'';


[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.