Initializing the Mirror Replication Agent instance

StepsInitializing the Mirror Replication Agent 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 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:

    pdb_init move_truncpt
    
    go
    

    A message appears, indicating that the procedure was successful. See the Mirror Activator Administration Guide.

  2. The ra_init command initializes the Mirror Replication Agent system database 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:

    ra_init
    
    go
    

    A message appears indicting that the procedure was successful.

    The ra_init command also causes the pdb_automark_tables setting to take effect.

  3. 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:

    resume
    
    go
    

    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.

  4. 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_status
    
    go
    

    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.

  5. Validate that both primary and standby connections are active:

    isql -Usa -P -SSAMPLE_RS
    
    admin who
    
    go
    

    NoteBe 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 returns similar status for threads to the following:

    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.oratest2DSI
    
    20   DSI EXEC   Suspended        103(1) NY.NYora92
    
    21   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