Page 1 of 1

Error Could not reserver record

Posted: Thu May 31, 2007 2:41 am
by najm
I face following error very frequently in my Database

<b>Could not reserver record (2 tries). keeb trying?</b>

i know why it show but i want to know how fix it.

Thanks.

Posted: Thu May 31, 2007 2:51 am
by ahmadbilal
get trace of oracle forms by using Oracle Trace and then check which record is get locked for more help please review
www.oracle.com/technology/products/forms/pdf/275144.pdf


By suppressing FRM-40501 you are defining the lock functionality to be
NO-WAIT. If the record is locked by another user, then do not wait for the
lock to be released, which basically implements the same behavior as pressing
the "NO" button on the Form alert.
For example: ON-LOCK Trigger : BLOCK Level

DECLARE
dummy VARCHAR2(1);
could_not_lock EXCEPTION;

/* Define Exception for ORA-00054, which occurs when an attempt */
/* is made to lock an already locked record. */
PRAGMA EXCEPTION_INIT (could_not_lock, -54);
BEGIN
SELECT 'X'
INTO dummy
FROM dept /* this is the table you are trying to access */
WHERE rowid = :dept.rowid
FOR UPDATE OF deptno NOWAIT;

MESSAGE('Locked Current Row ');

EXCEPTION
WHEN could_not_obtain_lock THEN
MESSAGE('Record locked by another user. Try Again Later');
RAISE FORM_TRIGGER_FAILURE;
END;