To add databases, you must create connections in the Replication Server for the primary and standby databases. You should also create database replication definitions and replication subscriptions in Replication Server.
You must have “sa” permission in the
Replication Server to perform these procedures.
Creating database connections in Replication Server
For ASE: Use the Replication Server utility rs_init to add connections to Replication Server. The utility rs_init does not support non-ASE databases.
For Oracle: Use the following procedure to create Oracle database connections.
Log in to the Replication Server with a user login that has “sa” permission.
Create a database connection for the primary database. For example, for an Oracle primary database, use the following:
create connection to pds.pdb using profile rs_oracle_to_oracle;standard set username to "ma_maint" set password to "ma_maint_pwd" with log transfer on, dsi_suspended go
Where:
pds is the name of the primary data server.
pdb is the name of the primary database.
ma_maint is the Maintenance User login for the primary database.
ma_maint_pwd is the password for the Maintenance User.
For an Oracle primary database, the pds and pdb values
are usually the server host name and Oracle SID, respectively.
If your Replication Server is version 15.1 or earlier, or if the oracle_error_class does not exist in your Replication Server, you can create the oracle_error_class using the following scripts from the Mirror Replication Agent installation:
Apply script $SYBASE/MA-15_2/scripts/oracle /oracle_create_error_class_1_rs.sql to Replication Server
Apply script $SYBASE/MA-15_2 /scripts/oracle /oracle_create_error_class_2_rssd.sql to the RSSD
Apply script $SYBASE/MA-15_2 /scripts/oracle /oracle_create_error_class_3_rs.sql to Replication Server
Also 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/MA-15_2/scripts/oracle /oracle_create_rs_sequence_repdef.sql
Create a database connection for the standby database. For example, for an Oracle standby database, use the following:
create connection to sds.sdb using profile rs_oracle_to_oracle;standard set username to "ma_maint" set password to "ma_maint_pwd" go
Where:
sds is the name of the standby data server.
sdb is the name of the standby database.
ma_maint is the Maintenance User login for the standby database.
ma_maint_pwd is the password for the Maintenance User.
If your Replication Server is version 15.1 or earlier
and 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/MA-15_2 /scripts/oracle /oracle_create_error_class_1_rs.sql to Replication Server
Apply script $SYBASE/MA-15_2 /scripts/oracle /oracle_create_error_class_2_rssd.sql to the RSSD
Apply script $SYBASE/MA-15_2 /scripts/oracle /oracle_create_error_class_3_rs.sql to Replication Server
Creating database replication definitions in Replication
Server
Replication Server requires a Database Replication Definition to identify the database objects that are to be replicated from the primary database.
Log in to the Replication Server with a user login that has “sa” permission.
Create a database replication subscription for the primary database:
create database replication definition pds_repdef with primary at pds.pdb replicate DDL go
where:
pds is the name of the primary data server.
pdb is the name of the primary database.
Creating database replication subscriptions in
Replication Server
A Database Subscription identifies the standby database that will receive the replicated transactions.
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 materialization go
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.