Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Replicating Data with Replication Server » Tutorial: Replicate data using Replication Server

Lesson 4: Confirm that the Open Servers are configured properly Next Page

Lesson 5: Add Replication Server information to the primary database


You need to add Replication Server tables and procedures to the primary site database for the database to participate in a Replication Server installation. You also need to create two user IDs for use by Replication Server. The SQL command file rssetup.sql is included with SQL Anywhere and performs these tasks.

The rssetup.sql command file must be run on the SQL Anywhere server from the Interactive SQL utility.

Run the rssetup script
  1. From Interactive SQL, connect to the SQL Anywhere database as the DBA.

  2. Run the rssetup script using the following command:

    read "install-dir\scripts\rssetup.sql"

    In this script, install-dir is your SQL Anywhere installation directory.

    Alternatively, you can choose File > Run Script, and browse to the file.

  3. Actions performed by rssetup.sql

    The rssetup.sql command file performs the following functions:

    Passwords and user IDs

    While the hard-wired user IDs (dbmaint and sa) and passwords are useful for test and tutorial purposes, you should change the password and perhaps also the user IDs when running databases that require security. Users with DBA permissions have full authority in a SQL Anywhere database.

    The user ID sa and its password must match that of the system administrator account on the Replication Server. SQL Anywhere does not currently accept a NULL password.

    Permissions

    The rssetup.sql script performs a number of operations, including some permissions management. The permissions changes made by rssetup.sql are outlined here. You do not have to make these changes yourself.

    For replication, ensure that the dbmaint and sa users can access this table without explicitly specifying the owner. To do this, the table owner user ID must have group membership permissions, and the dbmaint and sa users must be members of the table owner group. To grant group permissions, you must have DBA authority.

    For example, if the user DBA owns the table, you should grant group permissions to DBA:

    GRANT GROUP
    TO DBA

    You should then grant the dbmaint and sa users membership in the DBA group. To grant group membership, you must either have DBA authority or be the group ID.

    GRANT MEMBERSHIP
    IN GROUP "DBA"
    TO dbmaint ;
    GRANT MEMBERSHIP
    IN GROUP "DBA"
    TO sa;