Multi-Path Replication Quick Start

Update "Multi-Path Replication Quick Start" procedure in the Replication Server Administration Guide Volume 2.

Set up a multi-path replication replication system comprising of two primary and replicate paths for end-to-end replication
  1. Select or create two sets of tables or stored procedures that you want to replicate through two replication paths.
  2. Use rs_init to add the primary and replicate Adaptive Server databases to the replication system.
  3. Enable multithreaded RepAgent.
    At the primary Adaptive Server, enter:
    sp_config_rep_agent primary_database_name, ‘multithread rep agent’, ‘true’
    go
    
  4. Set the number of replication paths for RepAgent.
    For example, to enable two paths, enter:
    sp_config_rep_agent primary_database_name, 'max number replication paths', '2'
    go
    
  5. Create an alternate replication path from the primary database to Replication Server.
    1. Create the alternate physical RepAgent replication path named alternate_path_name.
      At the primary Adaptive Server, enter:
      sp_replication_path primary_database_name, 'add',
      "alternate_path_name", "repserver_name",
      "repserver_user", "repserver_password"
      go
    2. Create the corresponding alternate primary connection from Replication Server to the primary database and bind it to the alternate physical RepAgent replication path by using the same RepAgent replication path name—alternate_path_name.
      At the Replication Server, enter:
      create alternate connection to primary_dataserver.primary_database
      named primary_dataserver.alternate_path_name
      go

      See "create alternate connection" in the Replication Server Reference Manual for details.

    The replication system contains two primary replication paths—the default and alternate_path_name
  6. Restart RepAgent.
    sp_stop_rep_agent primary_database_name
    go
    sp_start_rep_agent primary_database_name
    go
  7. Create an alternate replicate connection from Replication Server to the replicate database using the same alternate replication path name—alternate_path_name.
    create alternate connection to replicate_dataserver.replicate_database
    named replicate_dataserver.alternate_path_name
    go
    The replication system contains two replicate replication paths—the default and alternate_path_name
  8. Bind one set of objects such as tables or stored procedures to the alternate replication path.
    sp_replication_path primary_database_name, 'bind', "table", "[table_owner].table_name", "alternate_path_name"
    go
    The other set of objects uses the default replication path. You can only bind objects to alternate replication paths. All objects that you do not bind to an alternate replication path, use the default path instead.
  9. Verify object bindings.
    sp_replication_path primary_database_name,'list'
    go
  10. Create a replication definition against the primary database.
    For example to create the authors_rep replication definition for the authors table:
    create replication definition authors_rep
    with primary at primary_dataserver.primary_database
    with all tables named 'authors'
    ...
    go
    If the default primary connection and the alternate primary connection are on different Replication Servers, create replication definitions on each Replication Server.
  11. Create a subscription against the default primary connection and the default replicate connection.
    create subscription subscription_default_path for replication_definition
    with primary at primary_dataserver.primary_database
    with replicate at replicate_dataserver.replicate_database
    go
    
  12. Create a subscription against the alternate primary connection and the alternate replicate connection.
    create subscription subscription_alternate_path for replication_definition
    with primary at primary_dataserver.alternate_path_name
    with replicate at replicate_dataserver.alternate_path_name
    go