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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Locking

Re: Locking

From: David Grzebien <dgrzebie_at_columbus.rr.com>
Date: Fri, 17 Nov 2000 01:50:52 GMT
Message-ID: <3A149068.DA0102DD@columbus.rr.com>

Out of curiousity, what is the purpose of "locking" the row even when the database starts up?

One thing you could do to implement this "locking" is to introduce a new column to the table (ie LOCK_IND) that would be a 'Y' or an 'N'. When you want a row to be locked, set the value to 'Y', and when you want it unlocked, set it to 'N'. Then you could place an UPDATE trigger on the table that checks the value of LOCK_IND on the table. If the value is 'Y', then raise an exception in the trigger indicating that the row is locked.

Hope this helps,

Dave Grzebien
Expert Technical Consultants, Inc
dave_at_etci.net

Graham Atkinson wrote:

> Is it possible within Oracle to lock a single record on a table so that any
> application attempting to update that record would get an error retruned.
> This lock needs to be present even if the database has been shutdown and
> restarted (although I could use a DBMS_JOB to kick the lock off again)
>
> Thanks,
>
> Graham.
  Received on Thu Nov 16 2000 - 19:50:52 CST

Original text of this message

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