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 need not 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_0\scripts on Microsoft Windows platforms).
To set 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
where:
ma_maint is the name of the Maintenance User in the primary database.
To set up Replication Server objects in the primary database, use the Replication Server setup for replicate script for the database you are replicating to. The primary database installation script is a SQL script named as follows: $SYBASE/REP-15_0/scripts/hds_oracle_setup_for_replicate.sql
The scripts in the Replication Server directory have
not been updated for this release. Instead, apply the following
scripts from the Mirror Replication Agent installation:
$SYBASE/MA-15_0/scripts\oracle\hds_oracle_new_setup_for_replicate.sql $SYBASE/MA-15_0/scripts\oracle \oracle_create_replicate_sequence_proc.sql