Set up Replication Server database objects

Replication Server requires a few database objects (procedures and tables) in the primary and standby databases, so that it can:

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.

For ASE

To set up Replication Server objects in the primary database, use the Replication Server primary database installation script which is a SQL script named:

The primary database installation script resides in the Replication Server scripts directory (for example, %SYBASE%\REP-15_2\scripts on Microsoft Windows platforms).

StepsSetting up Replication Server objects in the primary database

  1. Open an operating system command prompt window on the primary data server host machine.

  2. 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.

  3. Log in to the primary database with system administration privileges.

  4. 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.

For Oracle

To set up Replication Server objects in the primary database:

NoteIf 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