HI Guys ,
I was Reading about Autonomous Transaction from this link http://www.orafaq.com/node/1915.
I got doubt in the following code .How the dead lock happened .
Procedure p2 is independent and committed ,so what is the reason for the deadlock here .
can any one me explain me why it went it deadlock situation
create table t4 (a number)
/
insert into t4 values (1)
/
commit
/
create or replace
procedure p2
as
pragma autonomous_transaction;
begin
update t4 set a = 2;
commit;
end;
/
show errors
create or replace
procedure p1
as
begin
update t4 set a = 3;
p2;
commit;
end;
/
show errors
exec p1
SQL> exec p1
BEGIN p1; END;
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
ORA-06512: at "KEVIN.P2", line 5
ORA-06512: at "KEVIN.P1", line 5
ORA-06512: at line 1
Thanks
vijay
Edited by: vijay539 on May 10, 2010 12:05 PM
Edited by: vijay539 on May 10, 2010 12:06 PM