Home » RDBMS Server » Server Administration » Dead Lock
Dead Lock [message #182899] Tue, 18 July 2006 11:27 Go to next message
manish mendiratta
Messages: 110
Registered: May 2002
Senior Member
Hi Guys,
I have been about deadlock and some where i read ...

"Application developers can eliminate all risk of enqueue deadlocks by ensuring that transactions requiring multiple resources always lock them in the same order."


Now what does it means by "lock them in same order"?
Please explain

thanks
M
Re: Dead Lock [message #182909 is a reply to message #182899] Tue, 18 July 2006 12:29 Go to previous messageGo to next message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Look at the example at http://www.orafaq.com/faq/what_is_a_deadlock_and_how_does_one_fix_deadlock_errors
Re: Dead Lock [message #182919 is a reply to message #182899] Tue, 18 July 2006 13:33 Go to previous messageGo to next message
manish mendiratta
Messages: 110
Registered: May 2002
Senior Member
Thanks for your reply Frank.
I have already read that document. but even this doc says that tables should be locked in order. Please explain.
Re: Dead Lock [message #182926 is a reply to message #182919] Tue, 18 July 2006 13:58 Go to previous message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
The FAQ shows how you get a deadlock if session1 locks table emp then dept; and session2 locks dept then emp.

To solve this problem, update in the same order. For example, session1: emp then dept; session2: emp then dept.
Previous Topic: Pls-ORA-00600: internal error code, arguments: [qerixGetKey:optdesc], [], [], [], [], [], [], []
Next Topic: How to replace the damaged table by backup table
Goto Forum:
  


Current Time: Fri Sep 20 10:29:23 CDT 2024