Where to look when the batch fails, the RIB stops, or the form throws a mysterious ORA- error.
Batch Failures (.err Files)
When a Pro*C batch job fails during the overnight run, it usually throws a very generic error to the scheduling tool (like "Exit Code 1"). To find out what actually happened, you must check the error files.
By default, RMS Pro*C batches write errors to the directory defined in the $ERROR_DIR environment variable.
- Locate the file:
[batch_name]_[thread].err(e.g.,saldly_1.err). - Open it to find the specific Oracle ORA- error or the business logic failure (e.g., "Item 1001 does not exist on ITEM_MASTER").
Restart/Recovery Tables
If a batch fails midway, check the RESTART_PROGRAM_STATUS table. It will tell you exactly which thread failed, which commit point it reached, and the last primary key it successfully processed.
RIB Failures (Hospital Tables)
When a RIB message fails to process in RMS (e.g., a SIM message tries to update an item that hasn't been created in RMS yet), the RIB does not crash. It routes the message to the RIB Hospital.
The Hospital Flow:
- Check the
RIB_MESSAGEandRIB_MESSAGE_FAILUREtables (or use the RIB Hospital Admin UI/RIHA). - You will see the exact XML payload that failed and the Oracle error message.
- Fix the data: If the item was missing, create the item in RMS.
- Retry the message: Use the Hospital UI to click "Retry". The RIB will attempt to process the exact same XML payload again.
Tracing PL/SQL
If a custom batch or an RMS API is running terribly slow, or throwing an error deep within a 10,000-line package, you need to trace it.
Oracle provides standard tools like DBMS_PROFILER or SQL Tracing (ALTER SESSION SET SQL_TRACE = TRUE).
For application-level debugging, RMS has a built-in logging framework in some APIs. However, for deep database debugging, rely on the V$SESSION and V$SQL views.
If blocking_session is populated, you have a lock contention issue—often caused by a developer forgetting to COMMIT after testing an update, or a custom package missing a FOR UPDATE NOWAIT clause!
Key Takeaways
- For batch failures, always check the
.errfile in the$ERROR_DIR. - For integration failures, check the RIB Hospital tables and retry the XML payload.
- For performance or locking issues, rely on standard Oracle DBA views like
V$SESSION.


