HELLLLLLLP !!! ORA - 00060 Deadlock detected while waiting for resource

Posted on 1999-11-14
Medium Priority
Last Modified: 2011-04-14
Im working with Oracle Application Server 4.0.8 on Sun Solaris 2.6 , with Oracle database 8.0.5.
Im using the Oracle Call Interface.
While trying to execute one of my SQL's I got this error :
ORA - 00060 Deadlock detected while waiting for resource.
What is the reason for this error and how can I solve it?
Thank you
Question by:sharone_

Expert Comment

ID: 2206374
Let's say you have a table A and table B. And you have a transaction  in process X that is updating a row in table A and as such has lock on that row and now wants to update a row in table B. Meanwhile another transaction in process Y has already put a lock on that row on table B to update it and wants to update the row locked by the processes A. So, we have process X having a lock on a row on table A waiting for process Y to give up its lock on table B and process Y having a lock on the row in table B, that process X wants, and also process Y is waiting for process X to give up its lock on the row from table A that process Y wants. They sit there waiting for each other until timeout when Oracle rollsback one of the transaction and give that process a ORA-00060 error and lets the other transaction complete.

You can not completely get rid of deadlocks, they will happen once in a while. All you have to do is to retry the transaction. You can make the chancess of this happenning less by making sure that in you code for different transactions that update same tables, you update them in the same order.

Author Comment

ID: 2206894
So what should I do

Accepted Solution

uri22 earned 800 total points
ID: 2206907
sharone as mshalikh sais , you probably has another session that causes the deadlock.
Try to find out if you got an SQL PLUS / svrmgr  open ,that perform an operation on the same table (E.G. you try to DELETE the table from the SQLPLUS / svrmgr but didn't use the commit afterwards this table is locked!
if you will try to do anything else you will get a deadlock!)
Try to check it.
Hope it helps

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question