Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: lock timeout

Re: lock timeout

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 1 Sep 2002 01:35:37 -0700
Message-ID: <92eeeff0.0209010035.4d09866a@posting.google.com>


<timkarnold_at_comcast.net> wrote in message news:<8pfc9.325656$m91.13279141_at_bin5.nnrp.aus1.giganews.com>...
> Colleagues,
>
> Consider the situation where a user tries to update a record:
> Select * from tabA where PK = 'value' for update nowait
> The record selected is now locked until a commit, rollback or the session is
> closed.
> Is there any way to timeout the lock? After, say 45 minutes or an hour?
>
> Has anyone used DBMS_LOCK to do the equivalent?
>
> TIA,
> Tim

IMO, if your client design is to let the user do "select ... for update", then more often then not, you will run into these kind of situations. e.g a user/s may select a row/s for update and then go for lunch...while you as a DBA are stuck trying to kill, one or many, culprit sessions instead of doing other DBA duties. This kind of logic is best suited on the server.

Server should only lock the row when user clicks on "Save" button and the moment update is done/failed, client should commit/rollback the transaction.

This way, row is *only* locked when the actual update is done.

//Rauf Sarwar Received on Sun Sep 01 2002 - 03:35:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US