Home » SQL & PL/SQL » SQL & PL/SQL » Need help for locks related issue
Need help for locks related issue [message #254272] Thu, 26 July 2007 06:19 Go to next message
ashok_mni
Messages: 7
Registered: June 2005
Junior Member
Hi Guys,

I need small help for following issue.

following is the data in emp table

empid empname salary
------------------------
1111 Ashok 40000
2222 Yuvaraj 50000

there is a frontend application,Where 2 users(user1 and user2) are opened Ashok's employee salary from different locations and both are able to see Ashok's salary as 40000 only.

user1 updated the Ashok's salary as 60000 from frontend.
after sometime,user2 updated the Ashok's salary as 70000 from frontend with out refreshing current viewed window.

after sometime user1 viewd Ashok's salary and found it as 70000 instead of 60000.

is there any procedure (is it possible to write pl/sql block) to log these kind of changes?

what could be the best solution for these kind of issues?


Regards
Ashok Babu M
Re: Need help for locks related issue [message #254276 is a reply to message #254272] Thu, 26 July 2007 06:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From which application did you do such statements?
What are these "windows"?

Regards
Michel
Re: Need help for locks related issue [message #254297 is a reply to message #254272] Thu, 26 July 2007 06:43 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Google for optimistic and pessimistic locking. You will have to choose between the two, depending on the type of application you have (which is why Michel asked what application you use)
Re: Need help for locks related issue [message #254320 is a reply to message #254297] Thu, 26 July 2007 07:32 Go to previous messageGo to next message
ashok_mni
Messages: 7
Registered: June 2005
Junior Member
Java Application.
is it varry from one application to another application?

Regards
Ashok Babu M
Re: Need help for locks related issue [message #254325 is a reply to message #254320] Thu, 26 July 2007 07:43 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As Frank said, some applications use optimistic locking, other pessimistic locking and the last ones no locking at all.
The latter case seems to be yours.

Regards
Michel
Previous Topic: update column
Next Topic: Please help on merge satatement
Goto Forum:
  


Current Time: Sat Dec 10 05:10:46 CST 2016

Total time taken to generate the page: 0.04625 seconds