Set up a Multi-Path Replication system with two primary and replicate paths for end-to-end replication from an Adaptive Server primary to an Oracle replicate.
Use create connection or rs_init to create the default connection. See Replication Server Configuration Guide > Configure Replication Server and Add Databases using rs_init.
sp_config_rep_agent pdb, ‘multithread rep agent’, ‘true’where pdb is the primary Adaptive Server database.
sp_config_rep_agent pdb, 'max number of replication paths', '2'
sp_replication_path "pdb", 'add', "pdb_conn2", "PRS", "muser", "mpwd"where:
PRS is the Replication Server.
muser is the maintenance user.
mpwd is the maintenance user password.
create alternate connection to pds.pdb named pds.pdb_conn2 set error class to rs_sqlserver_error_class set function string class to rs_sqlserver_function_class set username to muser set password to mpwd with primary onlywhere pds is the primary Adaptive Server.
create connection to tns_alias_name.rdb using profile rs_oracle_to_oracle;eco set username muser set password mpwd set dsi_dataserver_make to 'ora' set dsi_connector_type to 'oci' set batch to 'off' gowhere:
rdb is the replicate Oracle System ID (SID) that is paired with the above tns_alias_name in the tnsnames.ora file. The default value is ORCL.
muser is the maintenance user for the replicate Oracle database.
mpwd is the replicate Oracle maintenance user password.
create alternate connection to tns_alias_name.rdb named tns_alias_name.conn2 set error class rs_oracle_error_class set function string class rs_oracle_function_class set username muser set password mpwd set dsi_dataserver_make to 'ora' set dsi_dataserver_type to 'oci' set batch to 'off' set dsi_proc_as_rpc to 'on' go
sp_setreptable ptab1,'true' go sp_setreptable ptab2,'true' go
sp_config_rep_agent pdb, ‘multipath distribution model’, 'object’
sp_replication_path pdb, 'bind', "table", "dbo.ptab2", "pdb_conn2"
create replication definition ptab1_repdef with primary at pds.pdb with all tables named 'ptab1' ... goTo create the ptab2_repdef replication definition for the ptab2 table:
create replication definition ptab2_repdef with primary at pds.pdb with all tables named 'ptab2' ... go
create subscription ptab1_sub for ptab1_repdef with replicate at tns_alias_name.rdb without materialization go
create subscription ptab2_sub for ptab2_repdef with replicate at tns_alias_name.conn2 without materialization go