Creating a Replication Server Connection to the Primary Database

Create a Replication Server connection to the primary database.

  1. Go to the %SYBASE%\RAX-15_5\scripts\sybase directory.
  2. Make a copy of the rs_create_test_primary_connection.sql script named my_mssql_rs_create_primary_connection.sql.
  3. Before executing the my_mssql_rs_create_primary_connection.sql script against your Replication Server, change {rax.test} to the name of the connection between Replication Agent and Replication Server, where:
    • rax is the name of the primary Microsoft SQL Server data server.

    • test is the name of the primary Microsoft SQL Server database.

    For example, NY.NYmss5.

    Note: Save these values to be used later for the rs_source_ds and rs_source_db parameters in the Replication Agent mssql.rs file.
  4. Change maint_user and maint_pwd to the user ID and password of the Microsoft SQL Server maintenance user who must have permission to apply DML operations against all user tables to be replicated, where:
    • maint_user is the user ID of the Microsoft SQL Server maintenance user you created for the primary connection.

    • maint_pwd is the password of the Microsoft SQL Server maintenance user (maint_user).

    Note: This user must be a valid user in the Microsoft SQL Server database, and it must be different from the user defined by the Replication Agent pds_username parameter, which is used for Replication Agent connections to the primary database.
    This command creates a Replication Server connection to the primary database example:
    create connection to NY.NYmss5
    set error class rs_udb_error_class
    set function string class rs_mss5_function_class
    set username maint_user
    set password change_on_install
    with log transfer on, dsi_suspended 
    go
  5. Execute the script in Replication Server:
    isql –Usa –Psa_pass –SSAMPLE_RS -i my_mssql_rs_create_primary_connection.sql

    You see a message indicating that the Replication Server connection to the primary database has been created.

Related tasks
Creating a Database Replication Definition
Creating a Database Replication Subscription