Results for “g_sess_max_commit_wait_time”
1 result
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
FND_ADG_MANAGE is an internal Oracle E-Business Suite package body that supports the Active Data Guard (ADG) functionality used to coordinate an EBS application tier with a physical standby database. Its role is to manage session state and synchronize commit activity between a primary EBS database and a standby configuration, ensuring that RPC (remote procedure call) execution and related validation routines behave correctly when a session is designated as slave to a standby database.
The package maintains several global session-level variables, including G_SESSION_IS_SLAVE_TO_STANDBY, G_SLAVE_SESSION_ID, G_SESS_MAX_COMMIT_WAIT_TIME, and related debug flags. These variables are initialized conservatively (typically to false or null) and are mutated by the package's validation and coordination procedures. The constant C_COMMIT_WAIT_SLEEP_TIME (set to 1) governs the polling interval used when waiting for commit counts to reach a target. The header comment ($Header: AFDGMGRB.pls 120.0 ...) confirms this is a shipped, supported component of the ADG management framework rather than a customer extension.
Key Procedures and Functions
The package exposes fourteen documented procedures and functions. The table below summarizes their roles based on the ETRM metadata and the visible source excerpt.
- VALIDATE_STANDBY_TO_PRIMARY — Validates the relationship from a standby database back to the primary, establishing or confirming session-level standby context.
- VALIDATE_PRIMARY_PRIVATE — Performs private validation on the primary side. In the source, its signature includes database id, database name, an OUT slave session id, SID, serial number, AUD$ session id, and a standby indicator.
- RAISE_RPC_EXEC_ERROR — Raises a structured error via FND_ADG_EXCEPTION using the C_MGRERR_RPC_EXEC_ERROR code. It composes a diagnostic string from the RPC descriptor's owner, package name, RPC package name, RPC synonym name, method name, location, and additional info.
- VALIDATE_RPC_TIMESTAMP — Validates a timestamp associated with an RPC invocation, presumably to detect stale or out-of-order calls.
- VALIDATE_RPC_SYNONYM — Checks the synonym used by an RPC against DBA_SYNONYMS/DBA_OBJECTS to ensure the target is valid.
- IS_SESSION_SLAVE_TO_STANDBY — Returns the current value of G_SESSION_IS_SLAVE_TO_STANDBY.
- HANDLE_RPC_DEBUG and HANDLE_SLAVE_RPC_DEBUG — Manage the G_SESS_HANDLE_RPC_DEBUG and G_SESS_HANDLE_SLAVE_RPC_DEBUG flags respectively, enabling diagnostic tracing.
- GET_COMMIT_WAIT_SEQ — Retrieves the current commit wait sequence value used for synchronization.
- INCREMENT_COMMIT_COUNT — Advances the commit counter, signalling progress to waiting sessions.
- WAIT_FOR_COMMIT_COUNT — The routine most relevant to the search term
wait_for_commit_count. It blocks the calling session until the commit count reaches an expected value, sleeping for C_COMMIT_WAIT_SLEEP_TIME (1 second) between polls and honoring G_SESS_MAX_COMMIT_WAIT_TIME as an upper bound. - BOOLEAN_TO_CHAR — Converts a BOOLEAN to 'TRUE', 'FALSE', or 'NULL' for diagnostics.
- INVOKE_STANDBY_ERROR_HANDLER and RPC_INVOKE_STANDBY_ERROR — Route error conditions arising during standby RPC execution to the appropriate handler.
Tables Accessed
The package references these objects through APPS synonyms: FND_ADG_PACKAGE (metadata about RPC packages), FND_ADG_COMMIT_WAIT (the commit-wait coordination table used by GET_COMMIT_WAIT_SEQ, INCREMENT_COMMIT_COUNT, and WAIT_FOR_COMMIT_COUNT), DBA_OBJECTS and DBA_SYNONYMS (for VALIDATE_RPC_SYNONYM), DBMS_LOCK (for serialized coordination), and the dynamic performance views V$DATABASE, V$MYSTAT, and V$SESSION (for database/session identification).
Usage Notes
FND_ADG_MANAGE is invoked implicitly by the EBS ADG machinery rather than by end users. It is called from other EBS packages (the metadata reports it is referenced by two other packages) and at session initialization when the ADG standby context must be established. Developers and DBAs encountering wait_for_commit_count in a trace or error log should understand that a session is intentionally polling FND_ADG_COMMIT_WAIT for a commit completion signal; persistent blocking generally indicates that the coordinating session did not increment the commit count, which may point to a failed or stalled RPC on the standby side. Because the package manipulates session-global state and relies on V$ views and DBMS_LOCK, it should be exercised only within the supported ADG configuration and not invoked directly from custom forms or concurrent programs.