When a Mirror Replication Agent instance is running, it can be in one of two discrete states:
Admin – the instance has no connections established to other Mirror Activator system components, but it is available to execute administrative commands, such as initializing the instance, changing configuration parameters, and maintaining the RASD. No replication processing occurs when the Mirror Replication Agent instance is in Admin state.
Replicating – the instance is performing its normal replication processing—scanning the transaction log on the log devices, processing log records and change-set data, and sending LTL commands to the Replication Server. In Replicating state, some administrative commands are not allowed.
When the state appears as Replicating (Waiting
at end of log), the instance is ready to perform (or
continue) its normal replication processing, but the Log Reader
component is idle and waiting for additional transactions to be logged.
The default start-up state is Admin. The Mirror Replication Agent instance goes to Admin state automatically when no start-up state is specified.
The state of a Mirror Replication Agent instance can be changed by either:
An external event that occurs while the Mirror Replication Agent is processing replicated transactions (for example, a network error on the Replication Server connection), or
Operator intervention (for example, invoking a command that changes the Mirror Replication Agent state).
From the moment a state-changing event occurs until the Mirror Replication Agent instance is actually in the new state, the instance is said to be “in transition.” During state transition, some administrative commands are ignored.
A Mirror Replication Agent instance goes to Admin state when:
The instance is started in its default state.
The instance is started with the ma utility -admin option.
The Mirror Replication Agent quiesce or suspend command is invoked.
An unrecoverable error occurs when the instance is in Replicating state.
In Admin state, the Mirror Replication Agent instance is running, but it has no connection established to the Replication Server (or RSSD, if so configured) or the primary database.
You can perform most administrative tasks while the Mirror Replication Agent instance is in Admin state, including changing the value of any Mirror Replication Agent configuration parameter.
In Admin state, the instance can
open a connection to the primary database, if necessary, to process
a command that requests results from the primary database.
A Mirror Replication Agent instance may go to Admin state from Replicating state when a network failure or communication error causes its connection to the Replication Server to be dropped.
When Mirror Replication Agent drops a connection, before it goes to Admin state, it attempts to re-establish the connection using the values recorded in its configuration parameters for that connection. If it cannot reconnect to the Replication Server, the Mirror Replication Agent instance goes to Admin state.
A Mirror Replication Agent instance goes to Replicating state when:
The instance is started with the ma utility -replicate option.
The Mirror Replication Agent resume command is invoked.
In Replicating state, the Mirror Replication Agent instance maintains a connection to the Replication Server, and its Log Reader component scans the mirror log devices for transactions to replicate.
Normally, when the Mirror Replication Agent instance is in Replicating state, it maintains a connection to the primary database to perform log truncation and archiving functions. If it drops the primary database connection (for example, because the primary database goes offline), Mirror Replication Agent logs the event and continues its normal replication processing, scanning the mirror log devices for transactions to replicate.
If the Mirror Replication Agent instance has finished processing all of the records in the transaction log, its state may appear as Replicating (Waiting at end of log). In that case:
The Log Reader component’s log-scanning process “sleeps” according to the values of the scan_sleep_increment and scan_sleep_max configuration parameters.
After the Log Transfer Interface (LTI) component finishes processing all of the change sets it received from the Log Reader and sending all of the LTL to the Replication Server, no replication throughput occurs until new replicated transactions appear in the log and the Log Reader scans them.
The Mirror Replication Agent instance remains in Replicating state, unless some other event causes it to go to Admin state.