Configuring Replication Server for replication from the primary database

This section describes the configuration steps required for replication from the primary database. It includes:

StepsCreating a Replication Server connection to the primary database

  1. Go to the %SYBASE%\RAX-15_2\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 Microsoft SQL Server data server.

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

    For example, NY.NYmss5.

    NoteSave these values to be used later for the rs_source_ds and rs_source_db parameters in the Replication Agent mssql.rs file.

  4. Execute the script in Replication Server:

    isql –Usa –P –SSAMPLE_RS -i my_mssql_rs_create_primary_connection.sql
    

    A message appears that indicates the Replication Server connection to the primary database has been created.

StepsCreating a database replication definition

  1. Navigate to the %SBYBASE%\RAX_15-2\scripts\sybase directory.

  2. Make a copy of the rs_create_test_db_repdef.sql script named my_mssql_rs_create_test_db_repdef.sql.

  3. Before executing the my_mssql_rs_create_test_db_repdef.sql script, change the value of {pds}.{pdb} to the name of the connection string you defined for the primary database, where:

    • pds is the name of the Microsoft SQL Server data server.

    • pdb is the name of the Microsoft SQL Server database.

    For example, NY.NYmss5.

    NoteSave these values to be used later for the rs_source_ds and rs_source_db parameters in the Replication Agent mssql.rs file.

    This is a database replication definition example:

    create database replication definition NY_repdef1
    
    with primary at NY.NYmss5
    
    go
    
  4. Connect to the Replication Server and enter:

    isql -Usa -P –SSAMPLE_RS -i my_mssql_rs_create_test_db_repdef.sql
    

    A message appears that indicates the database replication definition has been created.

StepsCreating a database replication subscription

  1. Make a copy of the rs_create_test_db_sub.sql script named my_mssql_rs_create_test_db_sub.sql.

  2. Before executing the my_mssql_rs_create_test_db_sub.sql script, change {pds}.{pdb} and {rds}.{rdb} to the appropriate connection name, where:

    • pds is the name of the Microsoft SQL Server data server.

    • pdb is the name of the Microsoft SQL Server database.

    • rds is the DirectConnect access service name.

    • rdb is the name of the replicate database.

    NoteSave these values to be used later in the Replication Agent mssql.rs file.

    Here is an example of create database replication subscription:

    create subscription NY_sub1
    
    for database replication definition NY_repdef1
    
    with primary at NY.NYmss5
    
    with replicate at my_mssql_access_service.my_repl_db
    
    without materialization
    
    go
    
  3. Connect to Replication Server and execute:

    isql -Usa -P –SSAMPLE_RS -i my_mssql_rs_create_test_db_sub.sql
    

    A message appears that indicates the subscription is being created.