Set up a Multi-Path Replication system with two primary and replicate connections for end-to-end replication from an Oracle primary to a HANA DB 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 USER muser PASSWORD mpwd;
[dataservername] master tcp ether hostname port query tcp ether hostname portwhere hostname and port are the host and port number of the HANA DB dataserver, and dataservername is a label used to identify the host and port number.
hdbuserstore set rds myhost:xxxxx my_securestore_user my_securestore_pwdwhere
create connection to rds.rdb using profile rs_ase_to_hanadb;ech set username muser set password mpwd go
create connection to rds.rdb using profile rs_ase_to_hanadb;ech set username auser set password apwd set dsi_connector_sec_mech to "hdbuserstore" go
rds is the replicate HANA DB data server. For a standard connection, this must match the interfaces file entry. For an SAP Secure User Store connection, this must match what you used as the key to create a user store of encrypted credentials with the hdbuserstore utility.
rdb is placeholder: You must provide a value, but it is not used..
muser is the maintenance user for the replicate HANA DB instance.
mpwd is the replicate HANA DB maintenance user password.
auser and apwd are unused values supplied only to satisfy the syntax of the create connection command.
create alternate connection to rds.conn2 using profile rs_ase_to_hanadb;ech set username muser set password mpwd go
create connection to rds.conn2 using profile rs_ase_to_hanadb;ech set username auser set password apwd set dsi_connector_sec_mech to "hdbuserstore" 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