Creating the Distribution Database

To complete the primary Adaptive Server configuration for ASE Replicator, you must create the Distribution Database. ASE Replicator uses the Distribution Database to maintain its stable queue and metadata objects.

StepsTo create the Distribution Database

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

  2. Create database devices for the Distribution Database and its log, using the disk init command to initialize database devices. For example:

    use master
    disk init name = "DDB_dev", 
    physname = "/devices/ddb_dev.dat", 
    size = "100M"
    dsync = true
    

    where DDB_dev is the database device name of the Distribution Database device, and ddb_dev.dat is the name of the operating system file mapped to the database device name.

    NoteSybase recommends that you create separate database devices for the Distribution Database and its log.

    See the System Administration Guide for more information on creating database devices and using the disk init command.

  3. Create the Distribution Database, using the create database command. For example:

    create database DDB_name on DDB_dev = "100M"
    log on DDBlog_dev = "100M"
    

    where DDB_name is the name of the Distribution Database, DDB_dev is the database device name of the Distribution Database device, and DDBlog_dev is the database device name of the Distribution Database log device.

    NoteAfter you create the Distribution Database, dump the master database to facilitate recovery if the master database is damaged.

  4. Add the ASE Replicator system user to the Distribution Database:

    use DDB_name
    
    sp_adduser rep_login, rep_user
    

    where DDB_name is the name of the Distribution Database, rep_login is the user login ID of the ASE Replicator system user, and rep_user is the user name of the ASE Replicator system user in the Distribution Database.

  5. Grant create table and create procedure permissions to the ASE Replicator system user in the Distribution Database:

    grant create table, create procedure to rep_user
    

    where rep_user is the user name of the ASE Replicator system user.

  6. Set the following database options for the Distribution Database:

  7. Run the checkpoint command in the Distribution Database.