PDA

View Full Version : Locking


Pat
10-20-2005, 07:50 AM
Hi all,

in oracle form when user locks a row. some other process which needs
the same row will need to wait until the first user commit/rollback.

is it possible to write something to alert the user that someone is waiting
for the resource?

thx

DA Morgan
10-20-2005, 09:32 AM
Pat wrote: Hi all, in oracle form when user locks a row. some other process which needs the same row will need to wait until the first user commit/rollback. is it possible to write something to alert the user that someone is waiting for the resource? thx

Look at Advanced Queuing and timers.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)

Hans Forbrich
10-20-2005, 10:17 AM
On Thu, 20 Oct 2005 23:50:58 +0800, Pat interested us by writing:
in oracle form when user locks a row. some other process which needs the same row will need to wait until the first user commit/rollback.

Depends ENTIRELY on what locks are in place and what lock state the other
process needs.

For example, even if a process updates a row, other processes will
normally be able to read the previous copy (or before begin of
transaction copy) of the row without any hesitation. Writers do not block
readders and readers do not block writers - under 'normal' circumstances
and within 'normal' limits.

--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** I no longer assist with top-posted newsgroup queries ***

Pat
10-21-2005, 06:21 AM
"HansF" <News.Hans@telus.net> wrote in message
news:pan.2005.10.20.18.15.50.70906@telus.net... On Thu, 20 Oct 2005 23:50:58 +0800, Pat interested us by writing: in oracle form when user locks a row. some other process which needs the same row will need to wait until the first user commit/rollback. Depends ENTIRELY on what locks are in place and what lock state the other process needs. For example, even if a process updates a row, other processes will normally be able to read the previous copy (or before begin of transaction copy) of the row without any hesitation. Writers do not block readders and readers do not block writers - under 'normal' circumstances and within 'normal' limits. -- Hans Forbrich Canada-wide Oracle training and consulting mailto: Fuzzy.GreyBeard_at_gmail.com *** I no longer assist with top-posted newsgroup queries ***
Thanks. instead both processes need to update the same row.

Pat
10-21-2005, 06:23 AM
"DA Morgan" <damorgan@psoug.org> wrote in message
news:1129829572.483502@yasure... Pat wrote: Hi all, in oracle form when user locks a row. some other process which needs the same row will need to wait until the first user commit/rollback. is it possible to write something to alert the user that someone is
waiting for the resource? thx Look at Advanced Queuing and timers. -- Daniel A. Morgan http://www.psoug.org damorgan@x.washington.edu (replace x with u to respond)

Do you mind give me more hints? I browsed and search
lots of websites including Oracle, OTN, google, newsgroup etc
but have not much related to this.

Thx.

DA Morgan
10-21-2005, 09:44 AM
Pat wrote: "DA Morgan" <damorgan@psoug.org> wrote in message news:1129829572.483502@yasure...Pat wrote:Hi all,in oracle form when user locks a row. some other process which needsthe same row will need to wait until the first user commit/rollback.is it possible to write something to alert the user that someone is waitingfor the resource?thxLook at Advanced Queuing and timers.--Daniel A. Morganhttp://www.psoug.orgdamorgan@x.washington.edu(replace x with u to respond) Do you mind give me more hints? I browsed and search lots of websites including Oracle, OTN, google, newsgroup etc but have not much related to this. Thx.

You can use Queues to message between sessions, between instances, and
from server to application.

You can use timers to execute code that checks, periodically, for
messages from queues.

HTH
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)

Hans Forbrich
10-21-2005, 12:50 PM
On Fri, 21 Oct 2005 22:21:22 +0800, Pat interested us by writing:
"HansF" <News.Hans@telus.net> wrote in message news:pan.2005.10.20.18.15.50.70906@telus.net... On Thu, 20 Oct 2005 23:50:58 +0800, Pat interested us by writing: in oracle form when user locks a row. some other process which needs the same row will need to wait until the first user commit/rollback. Depends ENTIRELY on what locks are in place and what lock state the other process needs. For example, even if a process updates a row, other processes will normally be able to read the previous copy (or before begin of transaction copy) of the row without any hesitation. Writers do not block readers and readers do not block writers - under 'normal' circumstances and within 'normal' limits. Thanks. instead both processes need to update the same row.

In that case, the second to the row will wait on the first to commit or
rollback.

Sounds like a design issue or flaw if this is a concern.

--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** I no longer assist with top-posted newsgroup queries ***


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service