Adding the Replicate Database to the Replication Server

Add a replicate database to the Replication Server for MSA.

  1. Add the replicate Adaptive Server to the interfaces file of the Replication Server.
    Note: Restart the Replication Server if the interfaces file has changed.
  2. Go to $SYBASE/$SYBASE_REP/init/rs.
  3. Make a copy of the setupdb.rs file and rename it as myreplicate.rs.
  4. Edit the myreplicate.rs file.
    Note: You need to modify the parameters described in the "Sample values for myreplicate.rs file" table.
    Sample Values for the myreplicate.rs file
    Parameter Description Value
    sybinit.release_directory Valid path of the Replication Server software ($SYBASE). /opt/sybase
    rs.rs_name Name of the Replication Server. PRS
    rs.rs_rs_sa_user Specifies the user ID that has “sa” privileges on Replication Server. sa
    rs.rs_rs_sa_pass Specifies the password of the “sa” user. sa_pass
    rs.rs_ds_name Name of the data server that hosts the replicate database. sunak1505i
    rs.rs_ds_sa_user Specifies the user ID that has “sa” privileges on data server. sa
    rs.rs_ds_sa_password Specifies the password of the “sa” user for the data server. password
    rs.rs_db_name Specifies the name of the replicate database. pubs2
    rs.rs_needs_repagent Specifies whether you plan to replicate from specified rs.rs_db_name. no
    rs.rs_db_maint_user Specifies the user ID who will apply the work at the replicate database. The user is called the maintenance user. <database>_maint
    Note: If the user ID does not exist the script creates the user ID on the replicate database. The user ID cannnot be the name of an alias.
    rs.rs_db_maint_password Specifies the password for the user specified in rs.rs_db_maint_user. <database>_maint_ps
    rs.rs_db_physical_for_logical Specifies whether this is a warm standby database. no
  5. Save the file.
  6. Go to $SYBASE/$SYBASE_REP/install.
  7. Create the connection from the primary database to the Replication Server by running the resource file:
    ./rs_init -r ../init/rs/myreplicate.rs

    If the rs_init command fails, correct the issue, and re-run the rs_init.

  8. Validate the primary connection:
    isql -Usa -Psa_pass -SPRS
  9. Enter:
    admin who
    go
    
    The output from the command looks similar to:
    Spid     Name       State                Info
    -----   -------    ------------         -----------------
    48      DSI EXEC   Awaiting Command     102(1) sunak1502i.pubs2
    33      DSI        Awaiting Message     102 sunak1502i.pubs2
    35      DIST       Awaiting Wakeup      102 sunak1502i.pubs2
    36      SQT        Awaiting Wakeup      102:1 DIST sunak1502i.pubs2
    34      SQM        Awaiting Message     102:1 sunak1502i.pubs2
    32      SQM        Awaiting Message     102:0 sunak1502i.pubs2
    37      REP AGENT  Awaiting Command     sunak1502i.pubs2
    39      NRM        Awaiting Message     sunak1502i.pubs2
    27      DSI EXEC   Awaiting Command     101(1) sunak1505i.PRS_RSSD
    20      DSI        Awaiting Message     101 sunak1505i.PRS_RSSD
    26      SQM        Awaiting Message     101:0 sunak1505i.PRS_RSSD
    55      DSI EXEC   Awaiting Command     103(1) sunak1505i.pubs2
    54      DSI        Awaiting Message     103 sunak1505i.pubs2
    53      SQM        Awaiting Message     103:0 sunak1505i.pubs2
    21      dSUB       Sleeping
    15      dCM        Awaiting Message
    18      dAIO       Awaiting Message
    23      dREC       Sleeping             dREC
    9       dDELSEG    Awaiting Message  
    56      USER       Active               sa
    14      dALARM     Awaiting Wakeup
    24      dSYSAM     Sleeping
  10. Exit the isql session.