Oracle錯誤:Record is locked by another user
-bash-3.00$ sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 18 17:57:49 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> connect / as sysdba;
Connected.
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL>select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.logon_time;#查詢鎖
USERNAME SID SERIAL# LOGON_TIME
------------------------------ ---------- ---------- ------------
XXX_SKNG 390 23594 18-SEP-13
XXX_SKNG 603 51886 18-SEP-13
XXX_SKNG 272 2789 18-SEP-13
SQL> alter system kill session '390,23594';#Kill SID和SERIAL
System altered.
SQL> alter system kill session '603,51886';#Kill SID和SERIAL
System altered.
SQL> alter system kill session '272,2789';#Kill SID和SERIAL
System altered.
SQL> select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1, v$session t2 where t1.session_id=t2.sid order by t2.logon_time;
no rows selected #沒有被鎖內容,問題解決OK
本文出自 “freedom” 部落格,請務必保留此出處http://zhaoguohui.blog.51cto.com/3923573/1298831