You must create connections in the Replication Server for the primary and standby databases.
You must have “sa” permission in the
Replication Server to perform this procedure.
To create database connections in Replication
Server
Log in to the Replication Server with a user login that has “sa” permission.
Create a database connection for the primary database:
create connection to pds.pdb set error class oracle_error_class set function string class rs_oracle_function_class set username "mro_maint" set password "mro_maint_pwd" with log transfer on, dsi_suspended
where:
pds is the name of the primary data server.
pdb is the name of the primary database.
mro_maint is the Maintenance User login for the primary database.
mro_maint_pwd is the password for the Maintenance User.
The pds and pdb values are usually server host name
and Oracle SID.
If the oracle_error_class does not exist in your Replication Server, you can create it using the following scripts from the Mirror Replication Agent installation:Apply script $SYBASE/MRO-12_6/scripts /oracle_create_error_class_1_rs.sql to Replication ServerApply script $SYBASE/MRO-12_6 /scripts /oracle_create_error_class_2_rssd.sql to the RSSDApply script $SYBASE/MRO-12_6 /scripts /oracle_create_error_class_3_rs.sql to Replication Server
Create a database connection for the standby database:
create connection to sds.sdb set error class oracle_error_class set function string class rs_oracle_function_class set username "mro_maint" set password "mro_maint_pwd"
where:
sds is the name of the standby data server.
sdb is the name of the standby database.
mro_maint is the Maintenance User login for the standby database.
mro_maint_pwd is the password for the Maintenance User.
NOTE: If the oracle_error_class does
not exist in your Replication Server, you can create it using the
following scripts from the Mirror Replication Agent installation
instead:Apply script $SYBASE/MRO-12_6 /scripts /oracle_create_error_class_1_rs.sql to
Replication ServerApply script $SYBASE/MRO-12_6 /scripts /oracle_create_error_class_2_rssd.sql to
the RSSDApply script $SYBASE/MRO-12_6 /scripts /oracle_create_error_class_3_rs.sql to
Replication Server
Add Database Replication Definition and Subscription. Replication Server requires a Database Replication Definition to identify the database objects that are to be replicated from the Primary database. A Database Subscription identifies the standby database that will receive the replicated transactions.
To create database replication definitions in Replication Server:
Log in to the Replication Server with a user login that has “sa” permission.
Create a database replication definition for the primary database:
create database replication definition {pds}_repdef with primary at {pds}.{pdb} replicate DDLgo
where:
pds is the name of the primary data server.
pdb is the name of the primary database.
To create database replication subscription in Replication Server:
Log in to the Replication Server with a user login that has “sa” permission.
Create a database replication definition for the standby database:
create subscription {pds}_sub for database replication definition {pds}_repdef with primary at {pds}.{pdb} with replicate at {sds}.{sdb} without materializationgo
where:
pds is the name of the primary data server.
pdb is the name of the primary database.
sds is the name of the standby data server.
sdb is the name of the standby database.
Replication Server requires a unique function replication definition to support Oracle sequence replication.
The scripts in the Replication Server directory have not been updated for this release. Apply the following additional script from the Mirror Replication Agent installation to your Replication Server, after editing the script to include your primary database connection name:
$SYBASE/MRO-12_6/scripts /oracle_create_rs_sequence_repdef.sql