Set up a Multi-Path Replication system with two primary and replicate connections for end-to-end replication from an Oracle primary to an Adaptive Server replicate.
create connection to pds.pdb set error class rs_sqlserver_error_class set function string class rs_oracle_function_class set username muser set password mpwd with log transfer on, dsi_suspended gowhere:
pds is the value of the rs_source_ds parameter specified in Replication Agent.
pdb is the value of rs_source_db specified in Replication Agent.
muser is the maintenance user for the primary Oracle database.
mpwd is the maintenance user password.
create alternate connection to pds.pdb named pds.conn2 set error class rs_sqlserver_error_class set function string class rs_oracle_function_class set username muser set password mpwd with primary only go
create connection to rds.rdb set error class rs_sqlserver_error_class set function string class rs_sqlserver_function_class set username muser set password mpwd gowhere:
rds is the name of the replicate Adaptive Server data server.
rdb is the replicate Adaptive Server database.
muser is the maintenance user for the replicate Adaptive Server database.
mpwd is the maintenance user password.
create alternate connection to rds.rdb named rds.conn2 set error class rs_sqlserver_error_class set function string class rs_sqlserver_function_class set username muser set password mpwd go
grant create object to rs_username go
ra_config ra_admin_owner, ra_user_1 ra_config ra_admin_prefix, ra_ ra_config ra_admin_instance_prefix, ri1 ra_config rs_source_ds, pds ra_config rs_source_db, pdb
ra_admin init
ra_config ra_admin_owner, ra_user_1 ra_config ra_admin_prefix, ra_ ra_config ra_admin_instance_prefix, ri2 ra_config rs_source_ds, pds ra_config rs_source_db, conn2
ra_admin init
pdb_setreptable ptab1, mark goOn the Replication Agent instance identified by ri2:
pdb_setreptable ptab2, mark gowhere ptab1 and ptab2 are the primary database tables to be replicated.
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
resumeIf the Replication Agent instance fails to resume, verify that LogMiner is installed and configured. See the Replication Agent Primary Database Guide > Replication Agent for Oracle > Oracle-Specific Considerations > Oracle Transaction and Operation Troubleshooting > Setting Up Replication Agent and Oracle to use ra_dumptran and ra_helpop.
create subscription ptab1_sub for ptab1_repdef with replicate at rds.rdb without materialization go
create subscription ptab2_sub for ptab2_repdef with replicate at rds.conn2 without materialization go