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

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
sharone_Author Commented:
So what should I do
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.