Search Results msg_seq_no




Overview

OKC_AQMSGSTACKS_V is an APPS-owned database view in the Oracle E-Business Suite Contracts Core (OKC) product family. Its documented purpose is to expose the contents of the OKC_AQMSGSTACKS table in a reportable, query-friendly form. The view is registered as VALID against both Oracle EBS 12.1.1 and 12.2.2 and is identified by the object type VIEW. Because Oracle Advanced Queuing (AQ) message stacks are transient in nature and are held in internal queue tables, the OKC product provides this view as a controlled read surface over the message stack data that the Contracts application generates during integration and error-handling processing.

The view plays a supporting role in Oracle EBS reporting and integration diagnostics. Rather than requiring developers and support analysts to query the underlying AQ structures directly, OKC_AQMSGSTACKS_V presents the message stack records with named columns that can be joined to other OKC tables and filters. The presence of the MSG_SEQ_NO column is significant: it is the sequence key that orders entries within a message stack and allows callers to enumerate messages in the order they were enqueued or processed.

Underlying Base Objects

The ETRM metadata documents OKC_AQMSGSTACKS_V as a view over the base object OKC_AQMSGSTACKS, which is referenced through a SYNONYM. The view text confirms this relationship directly: the SELECT statement draws every column from OKC_AQMSGSTACKS (aliased AQMB). No joins, unions, or aggregations are present in the definition, so the view is a straightforward projection of the base table with an added ROWID alias.

Because the view references the synonym rather than the table directly, database links and schema resolution follow standard APPS synonym behavior. The synonym resolves within the APPS schema, and the view is queried by the same APPS credentials that own most EBS reporting objects. No INSTEAD OF triggers or materialized structures are documented, so the view is read-only in practice and carries no independent storage.

Key Columns

The view exposes eleven columns, all sourced unchanged from the base table. The central business columns are:

  • MSG_SEQ_NO — the message sequence number within the stack; the primary ordering attribute and the column most frequently used in filters and ORDER BY clauses.
  • AQE_ID — the AQ enqueue identifier, linking a stack entry back to its originating enqueue operation.
  • MESSAGE_NAME and MESSAGE_NUMBER — the logical name and numeric identifier of the queued message type.
  • MESSAGE_TEXT — the payload or textual content of the stacked message, typically the human-readable error or notification text.

The remaining columns are standard EBS audit and identity fields:

Common Use Cases and Queries

The most common use case is diagnosing Contracts integration failures. When an outbound or inbound contract interface raises an error, the message is stacked and can be retrieved in sequence order. A typical query returns the full stack for a given enqueue identifier:

  • SELECT msg_seq_no, message_name, message_number, message_text FROM okc_aqmsgstacks_v WHERE aqe_id = :p_aqe_id ORDER BY msg_seq_no;

A second pattern searches message text for known error fragments and returns the sequence context:

  • SELECT aqe_id, msg_seq_no, message_name, message_text FROM okc_aqmsgstacks_v WHERE message_text LIKE '%ERROR%' ORDER BY creation_date DESC, msg_seq_no;

A third pattern audits recent activity using the standard date columns:

  • SELECT aqe_id, msg_seq_no, message_name, created_by, creation_date FROM okc_aqmsgstacks_v WHERE creation_date >= SYSDATE - 1 ORDER BY creation_date DESC;

Because the view is a simple projection, these queries can be combined with joins to contract headers or interface tables on AQE_ID without concern for view-level transformations. Analysts should note that message stacks are typically purged or aged out, so results are bounded by whatever the base table retains at query time.