Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Error: Could not reserve record(2 tries)
declare
cursor c1 is
select 'lockme' from urtable where keys=value for update nowait; -- lock record(s) u wanna update/delete.. if ucannot acquire lock .. get out fast!!
open c1; -- u try to acquire lock here delete/update this record as u have succeded in locking; close c1; commit; -- release ur locks exception when others then if sqlcode=-54 then -- this is ur error .. cannot reserve record after n tries .. dbms_output.put_line('record in use .. try again'); else dbms_output.put_line(sqlerrm); end if;
hth
deepak
-----Original Message-----
From: Ajay Kothari [mailto:akothari_at_lipidata.com]
Sent: Saturday, September 16, 2000 1:00 AM
To: Multiple recipients of list ORACLE-L
Subject: Error: Could not reserve record(2 tries)
Database:ORACLE 7.3.4/ SCO-UNIX Open Server Release 5(5.0.2) / Forms5
/Win-98
Problem Defination: When the transaction is being made on a particular record (Query,Update or Delete)Sometimes the transaction hangs and the same record cann't be queried, even after opening a new session to do the same. At this movement v$locked_object view shows locked entries for that session/process. When we kill the session by giving "Alter system kill session 'SID, Serial#' command, the locked transaction is executed and clear the entries from v$locked_object view.
Error message(Forms): "Could not reserve record (2Tries) keep trying" with Yes or No options. 2 Tries increases upto n numbers on each hit.
It would be helpful to me if anyone could suggest a appropriate solution to above problem.
Thanks in advance
Ajay Kothari
akothari_at_lipidata.com
-- Author: Ajay Kothari INET: akothari_at_lipidata.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Sat Sep 16 2000 - 15:54:55 CDT
![]() |
![]() |