Sybase SQL Remote DC38133-01-0902-01 User Manual

Page of 485
Chapter 12. Administering SQL Remote for Adaptive Server
Enterprise
Running the Message Agent
This section describes how to run the Message Agent for Adaptive Server
Enterprise. For information on features of the Message Agent that are
common to Adaptive Server Anywhere and Adaptive Server Enterprise, see
The Message Agent and replication security
In the tutorials earlier in this book, the Message Agent was run using a user
ID with system administrator permissions. The operations in the messages
are carried out from the user ID specified in the Message Agent connection
string; by using a system administrator user ID, you can be sure that the user
has permissions to make all the changes.
In practice, you will not use such a user ID, but the Message Agent needs to
run using a user ID with replication role. You can grant replication role with
the following statement:
sp_role ’grant’, replication_role, user_name
The user for the Message Agent must have insert, update and delete
permissions on all replicated tables, in order to apply the changes. Also, the
replication error procedure must be created under the Message Agent user
ID.
When you setup your Adaptive Server Enterprise database, the scripts
ssremote.sql and squeue.sql must be run under the same user name you use
for the Message Agent.
For setup instructions, see
To hide the user password for the Message Agent user ID, you can store the
ssremote command-line options in a file, and use ssremote with the @data
parameter. You can use file system security to prevent unauthorized access
to the file.
Running multiple Message Agents
The three phases of Message Agent operation are described in the section
To summarize, these
phases are:
Receiving messages.
Scanning the transaction log.
Sending messages.
269