This section describes the commands you must issue to initialize a Mirror Replication Agent instance.
To initialize the Mirror Replication Agent instance
The pdb_init command verifies that the primary Oracle database is correctly configured to provide archived logging and supplemental logging, and that the Oracle user ID used by the Mirror Replication Agent has the necessary permissions. It also creates objects in the database to support stored procedure replication.
The pdb_init command includes the move_truncpt keyword that executes an archiving operation in Oracle to archive all redo log files. This establishes the current position in the redo log as the end of the log, from a replication standpoint.
To verify correct configuration for archived and supplemental logging, issue the pdb_init command:
pdb_init move_truncptgo
A message appears indicating that the procedure was successful.
For more information, see Chapter 2 in the Mirror Activator Administration Guide.
The ra_init command initializes the Replication Agent System Database (RASD) by reading schema information and redo log location information from the primary Oracle database. If this is a production setup, this step should coincide with creating the dump, copy, or data that is used to materialize the standby database.
To initialize the Mirror Replication Agent to read schema and redo log location information from the primary Oracle database, issue the ra_init command:
ra_initgo
A message appears indicting that the procedure was successful.
The ra_init command also causes pdb_automark_tables and pdb_auto_create_repdefs settings to take effect.
If this is a production setup, this step should coincide
with creating the dump (copy) of data that is used to materialize
the standby database.
The resume command puts the Mirror Replication Agent in an Active state, reading the Oracle redo log and sending commands to Mirror Replication Agent.
To place the Mirror Replication Agent in an Active state:
resumego
If the Mirror Replication Agent successfully transfers to a Replicating state, this result is returned:
State Action ------------ ------------------------- REPLICATING Ready to replicate data.
If the state returned is Admin, an error prevented the Replicating state from being achieved. To determine the error, review the contents of the Mirror Replication Agent system log. Also, see the Mirror Activator Administration Guide, Chapter 2, “Troubleshooting Mirror Replication Agent,” in the section titled, “Examining the Mirror Replication Agent when replication failure occurs.”
The ra_status command returns the state of the Mirror Replication Agent. It is good practice to verify that the Mirror Replication Agent remains in Replicating state, even after the resume command executes successfully.
To detect an error that occurred after replication start-up:
ra_statusgo
If the Mirror Replication Agent is in Replicating state, this result is returned:
State Action ------------ ------------------------- REPLICATING Ready to replicate data.
If the state returned is Admin, an error prevented the Replicating state from being achieved. To determine the error, review the contents of the Mirror Replication Agent system log.
Also, see the Mirror Activator Administration Guide, Chapter 2, “Troubleshooting Mirror Replication Agent,” in the section titled, “Examining the Mirror Replication Agent when replication failure occurs.”
Verify that both primary and standby connections are active, using the admin who command:
isql -Usa -P -SSAMPLE_RS admin who go
Be aware that:
The DSI connection for the primary database connection is usually down because you are not replicating data back to the primary database.
The Mirror Replication Agent connection, if established for the standby database connection, is usually down, because you are not replicating data from the standby database.
Do not proceed until admin who has similar status for threads to the following:
admin who go
This is displayed:
Spid Name State Info ---- ---------- --------------- ---------------------------------13 DSI EXEC Awaiting Command 101(1) SAMPLE_RS_ERSSD.SAMPLE_RS_ERSSD 9 DSI Awaiting Message 101 SAMPLE_RS_ERSSD.SAMPLE_RS_ERSSD 8 SQM Awaiting Message 101:0 SAMPLE_RS_ERSSD.SAMPLE_RS_ERSSD 54 DSI EXEC Awaiting Command 102(1) DCOServer.oratest2 53 DSI Awaiting Message 102 DCOServer.oratest2 17 SQM Awaiting Message 102:0 DCOServer.oratest2 DSI EXEC Suspended 103(1) NY.NYora92 DSI Suspended 103 NY.NYora92 24 DIST Awaiting Wakeup 103 NY.NYora92 25 SQT Awaiting Wakeup 103:1 DIST NY.NYora92 23 SQM Awaiting Message 103:1 NY.NYora92 22 SQM Awaiting Message 103:0 NY.NYora92 62 REP AGENT Awaiting Command NY.NYora92