Configuring and validating the Replication Agent resource file

A single installation of the Replication Agent can support replication from multiple databases. However, one Replication Agent instance is needed for each Microsoft SQL Server database that is to be replicated.

StepsConfiguring and validating the Replication Agent parameters in a resource file

  1. Locate the resource file template.

    The majority of configuration values required to create and initialize a Replication Agent can be recorded and stored in a resource file. Using a resource file provides a means to record or retain the configuration information for a Replication Agent instance, allowing an instance to be removed and re-created.

    The Microsoft SQL Server resource file template is at %SYBASE%\RAX-15_2\init\mssql.rs.

  2. Create an instance resource file:

    Copy the resource file template %SYBASE%\RAX-15_2\init\mssql.rs to another file, for example, myra.rs.

    Change the values assigned to properties in the resource file so they match the values required for your environment. The majority of these values are host, port, user, and password information for the Microsoft SQL Server, Replication Server, and RSSD connections.

    • Set the value of rs_source_ds to the value you chose for rax and pds in previous procedures.

    • Set the value of rs_source_db to the value you chose for test and pdb in previous procedures.

    The resource file is self-documenting, with each parameter described. See the Replication Agent Administration Guide.

    WARNING! The combined values of rs_source_ds and rs_source_db must match the {pds.pdb} values of the Replication Server primary connection name.

    Table 2-2: Resource file parameters

    Parameter

    Description

    Example values

    instance name

    Any valid name.

    myra

    admin_port

    Port number that Replication Agent uses.

    20500 (if in use, select a different port number)

    pds_server_name

    Name of the primary Microsoft SQL Server.

    TEAMSTER

    pds_port_number

    Port number for the primary Microsoft SQL Server.

    1433

    pds_dac_port_number

    Microsoft SQL Server Dedicated Administration connection port number.

    1348

    pds_database_name

    Name of the primary database.

    test_db

    pds_username

    User ID that Replication Agent uses to access the primary data server.

    ra_user

    pds_password

    Password for pds_username.

    sybase

    rs_host_name

    Machine where Replication Server is installed.

    teamster

    rs_port_number

    Port where Replication Server is installed.

    11752

    rs_username

    Replication Server user with CONNECT SOURCE and CREATE OBJECT capabilities.

    SAMPLE_RS_ra

    rs_password

    Password for rs_username.

    SAMPLE_RS_ra_ps

    rs_source_ds

    Valid name representing data server of primary Microsoft SQL Server database.

    NY

    rs_source_db

    Valid name representing primary Microsoft SQL Server database.

    NYmss5

    rs_charset

    Character set that Replication Server is using.

    NoteThe value defined for the rs_charset configuration parameter must match the RS_charset value in the Replication Server configuration file, %SYBASE%\REP-15_2 \install\<server>.cfg.

    cp850

    rssd_host_name

    Machine where RSSD resides.

    teamster

    rssd_port_number

    Port number where RSSD resides.

    11751

    rssd_database_name

    Database name for RSSD.

    SAMPLE_RS_ERSSD

    rssd_username

    Valid user for RSSD.

    SAMPLE_RS_RSSD_maint

    rssd_password

    Password for rssd_username.

    SAMPLE_RS_RSSD_maint_ps

    start_instance

    Automatically start the instance that was created.

    yes

    initialize_instance

    Automatically initialize the new Replication Agent instance.

    yes

  3. Be sure your CLASSPATH environment variable points to the Microsoft SQL Server JDBC driver, and use the Replication Agent ra_admin utility to validate the settings in the new instance resource file using the -vr parameter. For example:

    %SYBASE%\RAX-15_2\bin\ra_admin -vr myra.rs
    

    Validation results are returned as one of the following:

    • Response-file processing completed

    • Response-file processing completed with errors

    If any validation fails, the ra_admin utility returns an error message and information about the failure. You can repeat the validation process as many times as necessary until it executes without error. No entities are changed or created.