APP-SQLAP-10771: Could not reserve record

posted on 29 Dec 2015 08:01 by lookpranoi in Oracle

Solution การแก้ปัญหา APP-SQLAP-10771 : Could not reserve record. อ่านจาก message เข้าใจว่าเกิด session lock  แต่พอเข้าไป monitor session กลับไม่เจอ  ใช้ solution นี้หากพอจะรู้ว่า table ที่มันน่าจะโดน lock ไว้เพือ่หา SID ตัวที่มีปัญหา แล้ว kill session ทิ้งซะ



APP-SQLAP-10771: Could not reserve record.


APP-SQLAP-10771: Could not reserve record.

Unable to pay the AP invoice in full, Got above error while performing the action –> pay in full


Database lock from another session is present on the table AP_INVOICES_ALL, AP_INVOICE_LINES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL for the same record that user was trying to modify from application.

1) To determine what session has a lock on this record, please execute the following steps:
         a) Run the following to determine what tables are locked:
                --- --- ---
                SELECT a.object_id, a.session_id, substr(b.object_name, 1, 40)
                FROM v$locked_object a, dba_objects b
                WHERE a.object_id = b.object_id
                AND b.object_name like 'AP_%'
                ORDER BY b.object_name;
                --- --- ---
         b) Look at the results and insert whatever AP_% tables are returned from a) into the script below:
                --- --- ---
                SELECT l.*, o.owner object_owner, o.object_name
                FROM SYS.all_objects o, v$lock l
                WHERE l.TYPE = 'TM'
                AND o.object_id = l.id1
                --- ---
                SELECT SID, SERIAL#
                FROM v$session
                WHERE SID = <SID from b)>;
                --- --- ---
  2) Once the locking sessions have been identified, please use the below command to kill such sessions.
            --- --- ---
            ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
            Note: SID and serial# to be taken from the output from 1c).
            --- --- ---

Alternative Solution

If there are many items locked you may find it easier to follow this alternative solution:
   a) Ensure no-one is working and no processes are running in the system.
   b) Bounce the database.
   c) Retest the issue.





#1 By iTaewz ( on 2016-02-18 11:10