Home » SQL & PL/SQL » SQL & PL/SQL » deadlock
deadlock [message #355026] Wed, 22 October 2008 05:36 Go to next message
pratikoze
Messages: 1
Registered: October 2008
Junior Member
Hi,
Here is the deadlock situation I am facing.We receive swift message into our wmb flow where we unbulk that single message into number of messages. Now in this flow we call a procedure (CREATE PROCEDURE getNextUniqueId(OUT uniqueId INTEGER) LANGUAGE DATABASE EXTERNAL NAME "DB_DBA.DB.DB_GET_NEXT_UNIQUE_ID")
In the getNextUniqueId script ( PROCEDURE MRA_GET_NEXT_UNIQUE_ID(uniqueID OUT NOCOPY NUMBER)
AS
BEGIN
SELECT DB_DBA.DB_UNIQUEID_SEQ.NEXTVAL
INTO uniqueID
FROM DUAL;
END DB_GET_NEXT_UNIQUE_ID;) we get the unique id for each message generated.
------------------------------------------------------------
now the design is such that we have WMB on 4 unix boxes parallely processing number of messages at a given time but all these 4 talk to same database. So my assumption is that 2 messages were given the same unique id and hence the 2 sessiosn were trying to write the data to same row of the xyz table in the db, which resulted in deadlock and message failure.
----------------------------------------------
please provide inputs.
Re: deadlock [message #355036 is a reply to message #355026] Wed, 22 October 2008 05:55 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
my assumption is that 2 messages were given the same unique id

This is not possible.

When there is a deadlock (inside db) a trace file is generated.
Otherwise it is in your application (anyway, the origin is your application).

Regards
Michel
Previous Topic: truncate + procedure
Next Topic: Oracle useing Cross join
Goto Forum:
  


Current Time: Thu Feb 13 09:53:58 CST 2025