Home » SQL & PL/SQL » SQL & PL/SQL » how to maintain concurrency during process (oracle 10g)
how to maintain concurrency during process [message #403994] Tue, 19 May 2009 23:57 Go to next message
navneet_sharma
Messages: 70
Registered: September 2008
Location: New Delhi, India
Member
Hi ,
I m facing a problem ,need your help.
I have a payment process which is called from various processes
this process posts payment of customers.in multi user environment I need to maintain the consistency means no two payments should be posted for the customer concurrently.
I was using 'for update' in table for customer but while posting through batch processes,table gets locked while i process in loop.
Please suggest any alternative.

Regards,
Navneet

[Updated on: Wed, 20 May 2009 00:49] by Moderator

Report message to a moderator

Re: how to maintain concurrency during process [message #403995 is a reply to message #403994] Wed, 20 May 2009 00:09 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.
Re: how to maintain concurrency during process [message #404006 is a reply to message #403994] Wed, 20 May 2009 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Without having your model no one can help you.
What are your tables?

Regards
Michel
Re: how to maintain concurrency during process [message #404155 is a reply to message #403994] Wed, 20 May 2009 11:18 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
What exactly do you mean by
Quote:
in multi user environment I need to maintain the consistency means no two payments should be posted for the customer concurrently.


Two things won't happen at the same time - the database will always do one of them before the other one.

What situation are you trying to avoid?
Re: how to maintain concurrency during process [message #404156 is a reply to message #404006] Wed, 20 May 2009 11:19 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
Without having your model no one can help you.


Not so - this sounds like the sort of problem that can be solved without a create table statement - I reckon it's either a non-problem, or something that a bit of simple locking will fix.
Re: how to maintain concurrency during process [message #404175 is a reply to message #404156] Wed, 20 May 2009 11:47 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
JRowbottom wrote on Wed, 20 May 2009 18:19
Quote:
Without having your model no one can help you.


Not so - this sounds like the sort of problem that can be solved without a create table statement - I reckon it's either a non-problem, or something that a bit of simple locking will fix.

The solutions are different if payments and customers are in one or two tables.
If model is in 3NF it should be in 2 tables.

Regards
Michel
Previous Topic: UPDATE with random order
Next Topic: MAX Analytical Function on Date
Goto Forum:
  


Current Time: Fri Dec 09 15:55:47 CST 2016

Total time taken to generate the page: 0.36430 seconds