ORA-00054: Oracle queries locked objects and Solutions

Source: Internet
Author: User

Generally reported ORA-00054, it is likely that the object is locked, this error is generally "the resource is busy, but the specified way to obtain resources in NOWAIT, or timeout failure ", the solution is as follows:
 
1. query which objects are locked
 
Select object_name, machine, s. sid, s. serial #
From v $ locked_object l,
Dba_objects o,
V $ session s
Where l. object_id = o. object_id and l. session_id = s. sid;

2. Killing Processes
 
Alter system kill session 'sid, serial #';

In this way, the Lock Object problem is solved, but sometimes the ORA 00031 error "session marked for kill" may occur"
 
This indicates that the locked object has not been released for a long time and the process needs to be killed by the OS.
 
1. Find the process ID of the Lock Object
 
Select spid, oSUSEr, s. program
From v $ session s, v $ process p
Where s. paddr = p. addr and s. sid = sid (the sid here is the one found above)

2. Find the process and kill-9 to kill it.

Related Article

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.