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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to anticipate (Oracle) database locks.

Re: How to anticipate (Oracle) database locks.

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Sun, 18 May 2003 21:34:53 GMT
Message-ID: <3EC7FB29.C7154093@telusplanet.net>


Jan Brunia wrote:

> Hi,
>
> We have the problem of encountering database locks in our
> Java program. De piece of code most probably causing
> the lock is shown below.
>
> Has anybody some advise concerning how to avoid the locks
> and when they happen how to handle them and remove them
> runtime?

The first piece of advice is re-read the Application Developer's Guide on OTN - look up lock in the index. I suspect you are getting some concept confused. What is your interpretation of Lock?

In this case, I'd guess the/a user is looking at the row in particular, possibly holding it open 'for update', when you allow the user to click on 'discard' or 'delete' or some such. In which case, you are shooting yourself in the foot.

For us to help you, you have to detail the state of the system - or at least the rows affected - and the code shown does not detail any state, just implies a set of actions. Well kind-of 'cause I assume 'SQL_DELETE_CUSTOMER' has a true SQL action statement behind it.

The second piece of advice - don't cross post. The same people read & respond to all 3 groups and you've just managed to annoy at least a dozen of those who could help. Received on Sun May 18 2003 - 16:34:53 CDT

Original text of this message

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