Step 4. Initialize the MRO instance

This section describes the commands you must issue to initialize a MRO Instance:

StepsTo initialize the MRO instance

  1. 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 MRO 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 beginning of the log, from a replication standpoint.

    To verify correct configuration for archived and supplemental logging, issue the following pdb_init command:

    pdb_init move_truncptgo
    

    A message that indicates the procedure was successful is displayed.

    For more information, see the Mirror Replication Agent Administration Guide, Chapter 2, Setup and Configuration, in the section titled, “Initializing the Mirror Replication Agent transaction log.”

  2. 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 MRO to read schema and redo log location information from the primary Oracle database, issue the following ra_init command:

    ra_initgo
    

    A message that indicates the procedure was successful is displayed.

    The ra_init command also causes pdb_automark_tables and pdb_auto_create_repdefs settings to take effect.

    NoteIf this is a production setup, this step should coincide with creating the dump (copy) of data that is used to materialize the standby database.

  3. The resume command puts the MRO in an Active state, reading the Oracle redo log and sending commands to MRO.

    To place the MRO in an Active state, enter the resume command:

    resumego
    

    If the MRO successfully transfers to a Replicating state, the following 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 MRO system log. Also, see the Mirror Replication Agent Administration Guide, Chapter 2, “Troubleshooting Mirror Replication Agent,” in the section titled, “Examining the Mirror Replication Agent when replication failure occurs.”

  4. The ra_status command returns the state of the MRO. It is good practice to verify that the MRO remains in Replication state, even after the resume command executes successfully.

    To detect an error that occurred after replication startup, execute the ra_status command:

    ra_statusgo
    

    If the MRO is in Replicating state, the following 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 MRO system log.

    Changes that were made may require execution of ra_init force before retrying status.

    Also, see the Mirror Replication Agent Administration Guide, Chapter 2, “Troubleshooting Mirror Replication Agent,” in the section titled, “Examining the Mirror Replication Agent when replication failure occurs.”

  5. The Rep Server admin who command validates that the primary and standby connections are active. To validate that both primary and standby connections are active, issue the admin who command:

    isql -Usa -P -SSAMPLE_RS 
    admin who 
    go
    

    NoteBe aware of the following:

    • The DSI connection for the primary database connection is usually down, because you are not replicating data back to the primary database.

    • The MRO 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
    

    The following 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