Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: one lock statement

Re: one lock statement

From: peter <hhh.database_at_gmail.com>
Date: 15 Aug 2006 22:55:11 -0700
Message-ID: <1155707711.417816.66100@b28g2000cwb.googlegroups.com>


Hi Mike,

You will find your answer in my question and scenario given below: I want to ask one question on this question, can deadlock really help to remove deadlock at all, even if you lock one table? I give a very simple senario:

Session 1:
Lock table dept in exclusive mode;

Session 2:
Lock table emp in exclusive mode;

Session 1:
delete from emp where ename='MILLER';

Session 2:
delete from dept where dname='ACCOUNTING'; delete from dept where dname='ACCOUNTING';

            *
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource

So it will help you to lock most of the tables in your schema before you update anythink to remove deadlock condition.

mike7411_at_gmail.com wrote:
> Can one lock statement on multiple tables contribute to a deadlock?
>
> Here is an example:
>
> LOCK TABLE table1, table2, table3 IN EXCLUSIVE MODE;
>
> Thank you.
Received on Wed Aug 16 2006 - 00:55:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US