Stored Procedrue and Deadlock

Purpose of Document

This document is not intended to guide customers on how to write/put stored procedures in the database.

This document deals with possible locking (Deadlocks) or application failure which is caused by the implementation of stored procedures in the relational database system.

In general, it is hard to determine the root cause of the issue when additional routine is written outside JDE, so it is important to inform Oracle Support of any changes made at the database level (which may include: function, stored procedures, table triggers and view).

Symptoms appear in EnterpriseOne that return multiple errors/problems. One example of these issues are:

[RUNTIME] *ERROR* CallObject@44c1b9: COSE#1000 Request timeout: timeout after 300000ms host E1Logic:6015(1134) SocID:1139 PID:6004 BSFN:ShipConfirmEndDoc user:UserA Env:JPD900
[RUNTIME] *ERROR* CallObject@44c1b9: Server problem. The server may still be available, but because of state information, the entire unit-of-work must be resubmitted user:UserA Env:JPD900
[WARN ] UserA - [RUNTIME] BusFunctionAsynState.executeAsync(): async BSFN failed and need roll back!!

Notes:

Changes are as follows:

A deadlock has occurred with error "COSE#1000 Request timeout" in JAS, which is triggered by an add-on stored procedure against table F4201 (Sales Order Header File).

There are two outstanding messages; one from the database and the other from UBE logs as shown below.

I. On the database side, there are two queries that determine whether there is any blocking process/session:

sql> SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
SUBSTR(lock_type,1,15) "Lock Type",
SUBSTR(mode_held,1,15) "Mode Held",
SUBSTR(blocking_others,1,15) "Blocking?"
FROM dba_locks

sql> select a.owner,
a.object_name,
b.oracle_username,
b.os_user_name,
b.process,
b.session_id
from dba_objects a, v$locked_object b
where a.object_id=b.object_id order by b.process;

Note: The above query has to be issued by your in-house DBA and JDE will not be responsible for the result returned.


II. UBE log may contain the following:

JDB_EXEF.c4159 JDB3300020 - Fetch not allowed. Prior successful Select operation required for this request.
Exiting Fetch with Failure

Notes:


Remove the stored procedure from the Oracle Database Client.