Use replication definitions and subscriptions to bind a replicate connection for a replicate database and a primary connection for a primary database to create two complete replication paths in an MSA environment.
For example, if you have created Replication Servers REPX157 (= ID server) and REPX157A, using rs_init resource files, and REPX157 has a default primary connection X157.primdb and default replicate connection X155.repdb:
create alternate connection to X157.primdb named X157.primdb_A set error class to rs_sqlserver_error_class set function string class to rs_sqlserver_function_class set username to primdb_maint set password to primdb_maint_ps with primary only go
create alternate connection to X155.repdb named X155.repdb_A set error class to rs_sqlserver_error_class set function string class to rs_sqlserver_function_class set username to repdb_maint set password to repdb_maint_ps go
If there is route from the Replication Server where default connection exists to the one where alternate connection exists. Database replication definition information is automatically shared by both Replication Servers. Therefore, in the case above, you need to create database replication definition only once on REPX157.
create database replication definition primdb_A with primary at X157.primdb go
If there is no route from the Replication Server where default connection exists to the one where alternate connection exists. To subscribe to the primary database, you have to execute the same create database replication definition command again on REPX157A to share the information of primdb_A:
create database replication definition primdb_A with primary at X157.primdb go
create subscription primdb_A_sub for database replication definition primdb_A with primary at X157.primdb_A with replicate at X155.repdb_A without materialization go