FOR UPDATE OF not working [message #626685] |
Fri, 31 October 2014 01:19 |
vivek_rol
Messages: 65 Registered: February 2009
|
Member |
|
|
hi all,
we have online transaction processing setup
front end is java and backend is oracle 10g.
through java web we are passing transactions into oracle database. transactions are credit and debit.
we have table name as customer balance whose column structure is
transaction_date current_balance
through front end we are processing data into database through xml.we have procedures which captures this data
and insert or update into db
some time its is observed that whenwhere we pass 2 credit entries with same data of transactions, the customer
account is credited with only one entry.
we have used FOR UPDATE OF clause , but still the problem is there .
we also used COMMIT propery.
we are wondering why its happening in oracle . why oracle is not processing two transactions
with same date of transaction one by one? why it process only one transaction?
regards
vivek
Edited by Lalit : Removed superfluous lines in the end
[Updated on: Fri, 31 October 2014 01:40] by Moderator Report message to a moderator
|
|
|
|
|
|
|
Re: FOR UPDATE OF not working [message #626692 is a reply to message #626685] |
Fri, 31 October 2014 01:53 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
vivek_rol wrote on Fri, 31 October 2014 11:49
some time its is observed that whenwhere we pass 2 credit entries with same data of transactions, the customer
account is credited with only one entry.
we have used FOR UPDATE OF clause , but still the problem is there .
we also used COMMIT propery.
It means the select for update picks only one entry. You can execute the select for update for those entries in SQL*Plus and verify how many actual rows are selected. Can you please post a test case.
|
|
|
|
|
|
Re: FOR UPDATE OF not working [message #626696 is a reply to message #626694] |
Fri, 31 October 2014 02:41 |
|
Michel Cadot
Messages: 68647 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
vivek_rol wrote on Fri, 31 October 2014 07:59thanks lalit. i will revert u
Are you sure?
I have checked your 10 latest topics, you didn't thank nor even feedback to people that helped you.
Are you the kind of person who ask, ask, ask, take, take, take and never give anything not even the slightest "thank"?
Are you the kind of person who considers others as their servants that do not deserve a single sight of respect?
|
|
|
Re: FOR UPDATE OF not working [message #626697 is a reply to message #626692] |
Fri, 31 October 2014 03:37 |
cookiemonster
Messages: 13920 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Lalit Kumar B wrote on Fri, 31 October 2014 06:53
It means the select for update picks only one entry.
Looking at the OPs description I doubt it.
Sounds like they're getting 2 inputs to update the same target row and one of the inputs is being ignored. Select for update would be run against the target.
|
|
|
|
|
|
|