Initializing the Replication Agent instance

StepsInitializing the Replication Agent instance

NoteIf, in your resource file, you set initialize_instance to yes, skip this step and continue to step 2.

The pdb_xlog init command verifies that the primary IBM DB2 Universal Database is correctly configured to provide archived logging and that the IBM DB2 Universal Database user ID used by the Replication Agent has the necessary permissions. In addition, the pdb_xlog init command creates objects in the primary database to support replication.

  1. To initialize the Replication Agent instance, run:

    pdb_xlog init
    
    go
    

    A message appears, indicating that the procedure was successful.

  2. Enter:

    resume
    
    go
    

    If the Replication Agent successfully transfers to a replicating state, the following result is returned:

    State Action
    
    -------------------------------------
    
    REPLICATING Ready to replicate data.
    

    A returned state of ADMIN indicates that an error prevented the replicating state from being achieved. To determine the error, review the contents of the Replication Agent system log.

  3. The ra_status command returns the state of the Replication Agent. It is 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.
    

    A returned state of ADMIN indicates that an error prevented the replicating state from being achieved. To determine the error, review the contents of the Replication Agent system log.

  4. Validate that both primary and replicate 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 Replication Agent connection, if established for the replicate database connection, is usually down, because you are not replicating data from the replicate database.

    Do not proceed until admin who has similar status for threads to the following:

    admin who
    
    go
    

    The following appears:

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