Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

locked data

Status
Not open for further replies.

lecorr

Programmer
Apr 9, 2003
62
FR
Hi everybody,

I have a problem of locked data. A user tries to update a table with have a trigger updating another table on which the user is sometime on modification. So it hangs for a long long time.

My questions are:

1 - Is there a way to get a fast error message telling the user that a record is locked? Is there a timeout parameter to set ?

2 - I saw the NOWAIT command but it only works (as far as I saw) on 'select for update'. The fact is that I don't need to do this. I just do an update. So is there a way to simply do an 'UPDATE ... NOWAIT' (with a hint or ???).

Thanks

Christian
 
You should select for update before. You may select rowid also, thus the overhead will be minimal.

Regards, Dima
 
The way to specify NOWAIT is with

Select ...
For Update Nowait;

- so if you don't want your program to hang until the lock is released you will need to use this command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top