Oracle Retail12 min readBy Priyanshu Pandey

Debugging and Tracing Issues in Oracle RMS

A survival guide for Oracle RMS developers and support engineers. Learn how to trace PL/SQL executions, read RIB logs, and decipher batch error files.

Phase 9 · RMS Development & Customization

Where to look when the batch fails, the RIB stops, or the form throws a mysterious ORA- error.

12 min read📅Aug 24, 2026✍️Priyanshu Pandey📚Oracle RMS Series
SURVIVING SUPPORT

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.

  1. Locate the file: [batch_name]_[thread].err (e.g., saldly_1.err).
  2. 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 ERRORS

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:

  1. Check the RIB_MESSAGE and RIB_MESSAGE_FAILURE tables (or use the RIB Hospital Admin UI/RIHA).
  2. You will see the exact XML payload that failed and the Oracle error message.
  3. Fix the data: If the item was missing, create the item in RMS.
  4. 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

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.

Find What a Blocked Session is Doing
SQL
SELECT 
    s.sid, 
    s.serial#, 
    s.status, 
    s.blocking_session,
    q.sql_text
FROM 
    v$session s
LEFT JOIN 
    v$sql q ON s.sql_id = q.sql_id
WHERE 
    s.username = 'RMS_USER'
    AND s.status = 'ACTIVE';

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 .err file 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.
RetailCoder
All systems operational
v1.0 Live

RC:OMS

Multi-channel order management with double-entry inventory ledger. Amazon, Flipkart, Shopify, WooCommerce — one source of truth.

Launch demo →
v1.0 Live

RC:Storefront

Self-hosted headless e-commerce. Your server, your data, zero transaction fees. Native RC:OMS inventory sync.

Visit Storefront →
Pipeline

RC:Pulse

AI-powered retail analytics and demand forecasting — built natively on top of your RC:OMS and Storefront data.

Request early access →
Built in India 🇮🇳  ·  Architected by Priyanshu PandeyTalk to an engineer →