Enabling Precomputed Result Sets Replication for Earlier Versions of Replication Server

Create a procedure in the default database to automatically apply the relevant values for the session-level set options and ensure that precomputed result set DDL commands successfully replicate even if the Replication Server version does not include the rs_ddlsession_setting and rs_ddlsession_resetting system functions.

You must create the procedure in the default Adaptive Server database. See Adaptive Server Enterprise Transact-SQL Users Guide > SQL Building Blocks > isql utility > Default Databases. If you do not specify a database, the default is the master database. You can include the procedure in the login script of the original user or in the login script of the maintenance user if dsi_replication_ddl is on. Once the user logs in to the database to apply transactions, the procedure applies the relevant values for the session-level options and all operations of the user are impacted by the session-level set options..

  1. Create a procedure that applies the appropriate values to the Adaptive Server session-level set options that Adaptive Server requires for support of precomputed result sets.
    To create the pcrs_proc procedure at the rdb1 replicate database, enter:
    create procedure pcrs_maint_login_proc
    as
    set ansinull on
    set arithabort on
    set arithignore off
    set string_rtruncation on
    go
    grant all on pcrs_proc to public
    go
  2. Include the procedure that enables precomputed result set in the login script for the original user of the default replicate database.
    To include pcrs_proc in the login script for the rdb1_user1 database user who logs into the rdb1 database, enter:
    sp_modifylogin rdb1_user1, 'login script', pcrs_proc
    If you use the maintenance user to define the login script, DML replication may not proceed properly.