Q
Problem solve Get help with specific problems with your technologies, process and projects.

Receiving ORA-00054 error while running query

I am completely new to Oracle and I am just working on an assignment to run various queries on tables I created. Everything went well and my queries worked well until I tried to solve my next assignment problem and got this error: "ORA-00054: resource busy and acquire with NOWAIT specified." All I was trying to do is to find all employees who work on all projects.

Hi, I am completely new to Oracle and I am just working on an assignment to run various queries on tables I created. Everything went well and my queries worked well until I tried to solve my next assignment problem and got this error: "ORA-00054: resource busy and acquire with NOWAIT specified." All I was trying to do is to find all employees who work on all projects, like this:
SELECT EmpSSN
FROM WORKS_ON
WHERE ProjectNO IN (SELECT EmpSSN, ProjectNO FROM WORKS_ON WHERE
ProjectNO =ALL(1, 2, 3, 10, 20, 30));
where 2, 3, 10, 20, 30 are project numbers.
Now I cannot do anything, not even queries that worked just fine before. How to fix this? Please help.
Your query written as above should be rewritten. Instead of the following clause:
WHERE ProjectNO =ALL(1, 2, 3, 10, 20, 30)
 
Use this clause:
WHERE ProjectNO IN (1, 2, 3, 10, 20, 30)
The ORA-00054 error is telling you that your session attempted to obtain a lock on a database object in a manner that will not wait for the lock to be released if another session is holding the lock. Apparently, another session is holding the lock, therefore the ORA-00054 error was raised. Either wait until this session releases its lock, or kill the session holding the lock. A restart of the database will definitely release all of the locks. However, that may be a drastic step if you are not in a single user environment. To get examples of how to identify sessions holding locks, please visit my web site and look for a white paper titled "Solving User Problems." A section of that white paper deals with lock detection and resolution.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close