Creating a Replication System with Multiple Replicate Connections

Create default and alternate replicate connections, and create the corresponding subscriptions to build a multiple replicate connection replication system.

Prerequisites
Ensure that the transactions can be run in parallel, and then divide the replicate transactions into two sets.
Task

This example scenario, which you can use as a model for creating a replication system with multiple replicate connections, consists of the pdb primary database on the PDS primary data server, containing the T1 and T2 tables with corresponding repdef1 and repdef2 replication definitons. There is a transaction set affecting each table. The corresponding subscriptions are sub1 and sub2. The rdb replicate database is on the RDS replicate data server and the primary and replicate Replication Servers are RS1 and RS2.

  1. In RS1, use rs_init or create connection to create the default replicate connection to the replicate database.
    create connection to RDS.rdb
    using profile ase_to_ase;standard
    set username to rdb_maint
    set password to rdb_maint_ps
    go

    You can only use the ase_to_ase profile to create a connection to a replicate Adaptive Server database.

  2. In RS1, create an alternate replicate connection named RDS.rdb1 to the rdb replicate database.
    create alternate connection to RDS.rdb
    named RDS.rdb1
    go
    Optionally, create another alternate replicate connection to the replicate database from RS2. In RS2, enter:
    create connection to RDS.rdb
    named RDS.rdb2
    set error class to rs_sqlserver_error_class
    set function string class to rs_sqlserver_function_class
    set username to rdb_maint
    set password to rdb_maint_ps
    go
  3. Create the sub1 subscription and specify the default replicate connection to replicate transactions in the first transaction set.
    create subscription sub1 for repdef1
    with replicate at RDS.rdb
    go
  4. Create the sub2 subscription and specify an alternate replicate connection to replicate transactions in the second transaction set.
    create subscription sub2 for repdef2
    with replicate at RDS.rdb2
    go