This section describes the configuration steps required for replication from the primary database. It includes:
Creating a Replication Server connection to the primary database
Creating a database replication definition
Creating a database replication subscription
To create a Replication Server connection to the
primary database
Go to the Replication Agent scripts directory, %SYBASE%\RAX-15_1\scripts\sybase
Make a copy of the rs_create_test_primary_connection.sql script:
cp rs_create_test_primary_connection.sql my_mssql_rs_create_pri_connection.sql
Before executing the my_mssql_rs_create_pri_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 rs_source_ds (located in %SYBASE%\RAX-15_1\init\mssql.rs).
test is rs_source_db (located in %SYBASE%\RAX-15_1\init\mssql.rs).
You must save the defined values to be used for the
Replication Agent mssql.rs resource file later
in the process.
For example, NY.NYmss5.
Execute the script in Replication Server:
isql –Usa –P –SSAMPLE_RS -i my_mssql_rs_create_primary_connection.sql
A message is displayed that indicates the Replication Server connection to the primary database is created.
To create a database replication definition
Navigate to the %SBYBASE%\RAX_15-1\scripts\sybase directory.
Make a copy of the rs_create_test_db_repdef.sql script:
cp rs_create_test_db_repdef.sql my_mssql_rs_create_test_db_repdef.sql
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 rs_source_ds, located in %SYBASE%\RAX-15_1\init\mssql.rs.
pdb is rs_source_db, located in %SYBASE%\RAX-15_1\init\mssql.rs.
For example, NY.NYmss5.
This is a database replication definition example:
create database replication definition NY_repdef1 with primary at NY.NYmss5 go
Connect to the Replication Server and enter:
isql -Usa -P –SSAMPLE_RS -i my_mssql_rs_create_test_db_repdef.sql
A message is displayed that indicates the database replication definition is created.
To create a database replication subscription
Make a copy of the rs_create_test_db_sub.sql script:
cp rs_create_test_db_sub.sql my_mssql_rs_create_test_db_sub.sql
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 rs_source_ds, located in %SYBASE%\RAX-15_1\init\mssql.rs.
pdb is rs_source_db, located in %SYBASE%\RAX-15_1\init\mssql.rs.
rds is the DirectConnect access service name.
rdb is the name of the replicate database.
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
Connect to Replication Server and execute:
isql -Usa -P –SSAMPLE_RS -i my_mssql_rs_create_test_db_sub.sql
A message is displayed that indicates the subscription is in the process of being created.