Home » SQL & PL/SQL » SQL & PL/SQL » Both SAP and IMS replies are invoking the same function in stored procedure so need to synchronise
Both SAP and IMS replies are invoking the same function in stored procedure so need to synchronise [message #245647] Mon, 18 June 2007 05:08 Go to next message
vikram.goswami
Messages: 5
Registered: June 2007
Location: Banagalore
Junior Member
I am in Enterprise Application Integration team.It is also called as middleware.Around 250-300 account create request is coming to middleware from monday to middleware.

When middleware recieves account create request the middleware sends enrichment request (Customer information) to SAP and IMS(IBM Mainframe).Then middleware waits for reply from SAP and IMS both.

IMS reply has to come within 30 seconds and SAP reply has to come within 12 hours.But generally SAP and IMS replies within few milliseconds.SAP reply and IMS reply can come in any order and will invoke the same function.Inside the function some table entries are happening.So here I have to lock the particular row of table in such a way that the second reply will not be abe to enter the same data.This means SAP reply and IMS reply has to be synchronised.

In case SAP reply comes first and IMS reply timesout with 30 seconds then the problem is happening.In this case when SAP reply is about to update the table IMS reply would have come and invokes the same function which causes multiple request of account creation for same customer. and here we are ending with multiple account create request.

Both SAP and IMS replies are invoking the same function in stored procedure and updating same table within a gap of miliseconds.So need to synchronised the SAP and IMS reply.
Re: Both SAP and IMS replies are invoking the same function in stored procedure so need to synchroni [message #247479 is a reply to message #245647] Tue, 26 June 2007 01:27 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
I'd say, perhaps you can resolve this by locking the table in the beginning of the procedure. A SELECT FOR UPDATE with NOWAIT could do the trick. But perhaps I am missing something.

MHE
Re: Both SAP and IMS replies are invoking the same function in stored procedure so need to synchroni [message #247487 is a reply to message #245647] Tue, 26 June 2007 01:46 Go to previous message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
Why don't you check that the account already exists?
Previous Topic: How to print message like :no of rows are deleted from emp"
Next Topic: How to create one procedure to produce 3 output files
Goto Forum:
  


Current Time: Fri Dec 09 11:25:11 CST 2016

Total time taken to generate the page: 0.05735 seconds