User's Manual

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
“Running the Message Agent” on page 223.
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 “Setting Up SQL Remote” on page 19.
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
“Message Agent operation phases” on page 266. To summarize, these
phases are:
Receiving messages.
Scanning the transaction log.
Sending messages.
269