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: Locking Multiple records

Re: Locking Multiple records

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 11 Nov 2003 13:05:39 -0800
Message-ID: <4b5394b2.0311111305.38534c05@posting.google.com>


runa_b_at_indiatimes.com (Runa) wrote in message news:<d9bf8109.0311110229.7ed7cf1a_at_posting.google.com>...
> Is there anyway in which I can lock multiple records together, but
> release the lock one at a time i.e commit changes to one record at a
> time?
>
> Thanks.
> Runa

Just the way you phrased your question makes it appear you are thinking like you are using a files systems (locks and records) versus a database (transactions and rows). You need to think differently.

What is really your transaction? A COMMIT WORK; does an entire transaction. So if you have one transaction for all of the rows, then you commit at the end. If you have many transactions, one for each row, then commit with each row.

Take a step back and ask yourself:
 what is the application problem I am trying to solve?

HTH,
  Ed

PS after all that, look up
AUTONOMOUS_TRANSACTION PRAGMA
which may actually be what you need. Received on Tue Nov 11 2003 - 15:05:39 CST

Original text of this message

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