Set up a Multi-Path Replication system with two primary and replicate connections for end-to-end replication from an Oracle primary to an Oracle 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 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
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 tns_alias_name.rdb without materialization go
create subscription ptab2_sub for ptab2_repdef with replicate at tns_alias_name.conn2 without materialization go