Initializing the Replication Agent Instance

Initialize the Replication Agent instance.

Note: If you set initialize_instance to yes in your resource file, and if you received no errors while the instance was created, skip to step 2.
  1. The ra_admin 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 Replication Agent has the necessary permissions. In addition to creating objects in the database to support stored procedure replication, the ra_admin init command also initializes the Replication Agent System Database (RASD) by reading schema information, and redo log location information from the primary Oracle database.
    To initialize the Replication Agent instance, run:
    ra_admin init
    go
  2. Enter:
    resume
    go
    If the Replication Agent successfully transfers to a replicating state, you see:
    State             Action
    ----------------- --------------------------
    REPLICATING       Ready to replicate data.
    The Replication Agent goes to the REPLICATION DOWN state if an error occurs:
    isql –Usa –Psa_pass –Smyra
    1> resume
    2> go
    Msg 32000, Level 20, State 0:
    Server 'myra', Procedure 'resume', Line 1:
    Command <resume> failed - Desired state <REPLICATE>
    could not be achieved. Current state: <REPLICATION DOWN>
  3. The ra_status command returns the state of the Replication Agent. It is a good practice to verify that the Replication Agent remains in replication state, even after the resume command executes successfully.
    To detect an error that occurred after replication start-up, execute:
    ra_status
    go
    If the Replication Agent is in replicating state, ra_status returns:
    State             Action
    ----------------- -------------------------
    REPLICATING       Ready to replicate data.
    The Replication Agent goes to the REPLICATION DOWN state if an error occurs:
    1> ra_status
    2> go
    State             Action
    ----------------- -----------------------
    REPLICATION DOWN  Waiting for operator command.
  4. Validate that both primary and replicate connections are active:
    isql -Usa -Psa_pass -SSAMPLE_RS
    admin who
    go
    Note: Be aware that the DSI connection for the primary database connection is usually suspended because you are not replicating data back to the primary database.

    Do not proceed until admin who returns status for threads similar to this:

    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) rds.rdb
    53   DSI       Awaiting Message 102 rds.rdb
    17   SQM       Awaiting Message 102:0 rds.rdb
    20   DSI EXEC  Suspended        103(1) pds.pdb
    21   DSI       Suspended        103 pds.pdb
    24   DIST      Awaiting Wakeup  103 pds.pdb
    25   SQT       Awaiting Wakeup  103:1 DIST pds.pdb
    23   SQM       Awaiting Message 103:1 pds.pdb
    22   SQM       Awaiting Message 103:0 pds.pdb
    62   REP AGENT Awaiting Command pds.pdb