Oracle tablespace unlock

Source: Internet
Author: User

Oracle error: 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,200 7, 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; # query the lock

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 '000000'; # Kill SID and SERIAL
System altered.

SQL> alter system kill session '000000'; # Kill SID and SERIAL
System altered.

SQL> alter system kill session '1949'; # Kill SID and 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 # no locked content, problem solving OK

This article is from the freedom blog, please be sure to keep this source http://zhaoguohui.blog.51cto.com/3923573/1298831

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.