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 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. The primary database installation script is a SQL script named:

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

NoteYou must have a System Administrator user role in the primary Adaptive Server to perform this procedure.

StepsTo set 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.

  3. Log in to the primary Adaptive Server with a System Administrator user role.

  4. Grant permissions on the Replication Server objects in the primary database:

    use pdb
    grant all on rs_lastcommit to mra_maint
    grant execute on rs_get_lastcommit to mra_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:

  5. Disable replication for the rs_lastcommit table in the primary database:

    use pdb
    sp_setreplicate rs_lastcommit, false
    

    where pdb is the name of the primary database.

  6. Mark the rs_update_lastcommit procedure for replication:

    use pdb
    sp_setrepproc rs_update_lastcommit, "function"
    

    where pdb is the name of the primary database.

  7. Set the primary data server to ignore the secondary truncation point in the primary database log:

    use pdb
    dbcc settrunc("ltm", "ignore")
    

    where pdb is the name of the primary database.