ASA Database Administration Guide
Replicating Data with Replication Server
Tutorial: Replicate data using Replication Server
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 comes with Adaptive Server Anywhere, and carries out these tasks.
The rssetup.sql command file must be run on the Adaptive Server Anywhere server from the Interactive SQL utility.
Run the rssetup script
From Interactive SQL, connect to the Adaptive Server Anywhere database as user ID DBA using password SQL.
Run the rssetup script using the following command:
read "path\rssetup.sql"
where path is your Adaptive Server Anywhere installation directory.
You can alternatively use File
The rssetup.sql command file carries out the following functions:
Creates a user named dbmaint, with password dbmaint and with DBA permissions. This is the maintenance user name and password required by Replication Server to connect to the primary site database.
Creates a user named sa, with password sysadmin and with DBA permissions. This is the user ID used by Replication Server when materializing data.
Adds sa and dbmaint to a group named rs_systabgroup.
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 an Adaptive Server Anywhere database.
The user ID sa and its password must match that of the system administrator account on the Replication Server. Adaptive Server Anywhere does not currently accept A NULL password.
The rssetup.sql script carries out 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 user DBA owns the table, you should grant group permissions to the DBA user ID:
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 ;