oralce 資料表空間解鎖

來源:互聯網
上載者:User

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

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.