Replication Server requires a few database objects (procedures and tables) in the primary and standby databases, so that it can:
Place markers in the database transaction log
Manage the secondary truncation point in the database
Keep track of successfully replicated transactions
Replicate stored procedures
Replicate sequences (Oracle only)
You do not need to set up Replication Server objects in the standby database, because when you materialize the standby database, Replication Server objects in the primary database are copied to the standby database.
To set up Replication Server objects in the primary database, use the Replication Server primary database installation script which is a SQL script named:
rsinspri.sql on Microsoft Windows platforms
rs_install_primary.sql on UNIX platforms
The primary database installation script resides in the Replication Server scripts directory (for example, %SYBASE%\REP-15_2\scripts on Microsoft Windows platforms).
Setting up Replication Server objects in the primary
database
Open an operating system command prompt window on the primary data server host machine.
At the operating system command prompt, invoke the isql utility to execute the primary database installation script in the primary database.
On Microsoft Windows platforms, enter:
isql –Usa –Ppwd –Spds –Dpdb –i rsinspri.sql
where:
sa is the system administrator user login on the primary data server.
pwd is the password for the system administrator user login.
pds is the name of the primary data server.
pdb is the name of the primary database.
On UNIX platforms, enter:
isql –Usa –Ppwd –Spds –Dpdb –i rs_install_primary.sql
where:
sa is the system administrator user login on the primary data server.
pwd is the password for the system administrator user login.
pds is the name of the primary data server.
pdb is the name of the primary database.
Log in to the primary database with system administration privileges.
Grant permissions on the Replication Server objects in the primary database:
grant all on rs_lastcommit to ma_maint grant execute on rs_get_lastcommit to ma_maint grant execute on rs_update_lastcommit to public grant execute on rs_check_repl_stat to public grant execute on rs_marker to public grant all on rs_ticket_history to ma_maint
where:
ma_maint is the name of the Maintenance User in the primary database.
To set up Replication Server objects in the primary database:
If your Replication Server is version 15.1 or earlier, you must manually execute the following Replication Server setup script:
$SYBASE/REP-15_X/scripts/hds_oracle_setup_for_replicate.sql
If your Replication Server is version 15.2 or later, you can use the Replication Server create connection command with the using profile clause specifying the rs_oracle_to_oracle profile. This profile creates all the objects, error classes, and datatype translations required to replicate Oracle data.
If your Replication Server is version 15.1 or earlier,
apply the following scripts from the Mirror Replication Agent installation
instead of the Replication Server hds_oracle_setup_for_replicate.sql script:
$SYBASE/MA-15_2/scripts/oracle/hds_oracle_new_setup_for_replicate.sql $SYBASE/MA-15_2/scripts/oracle /oracle_create_replicate_sequence_proc.sql