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: Deadlocking in Oracle

Re: Deadlocking in Oracle

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 29 Aug 2001 21:29:18 -0500
Message-ID: <ulmk25d6f.fsf@verizon.net>


On Wed, 01 Aug 2001, sanjayDELETECAPS_at_lexisnexis.com wrote:

> I am running into a deadlock situation and would like to get
> some suggestions on how to avoid it. I am using OCI to do the
> following
>
> Starting OCI transacation (implicit)
> //Execute the following sql through OCI
> Delete MyTable where id="123"; // Delete multiplr rows
> if delete fails OCITransRollback;
> Insert INTO MyTable (id, name, val) VALUES ('123', 'n1', 'v1')
> if insert fails OCITransRollback;
> Insert INTO MyTable (id, name, val) VALUES ('123', 'n2', 'v2')
> if insert fails OCITransRollback;
> Insert INTO MyTable (id, name, val) VALUES ('123', 'n3', 'v3')
> if insert fails OCITransRollback;
> else OCITransCommit;
>
> Under heavy load above pesdu methods causes deadlock. Note it
> is possible that multiple clients are using the same id to
> insert and delet rows. I have checked to make sure I rollback
> in case of all failures and commit in case of success.
>
> Sanjay

--
Galen Boyer
It seems to me, I remember every single thing I know.
Received on Wed Aug 29 2001 - 21:29:18 CDT

Original text of this message

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