Collection Contents Index How the Message Agent for Adaptive Server Enterprise works Error reporting and handling pdf/chap12.pdf

Data Replication with SQL Remote
   PART 3. SQL Remote Administration
     CHAPTER 12. Administering SQL Remote for Adaptive Server Enterprise       

Running the Message Agent


For Info     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.

Top of page  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

Top of page  Running multiple Message Agents

The three phases of Message Agent operation are described in the section Message Agent operation phases. To summarize, these phases are:

You may wish to run separate copies of the Message Agent to carry out these different phases. You can specify which phases a given Message Agent is to execute on the Message Agent command line.

Specifying which phases to execute 

The command-line options are as follows:

There are several circumstances where you may wish to run multiple Message Agents.

How Message Agents are synchronized 

The operations of two or more Message Agents are synchronized by a table called sr_marker. This table has a single column called marker, of data type datetime.

When the Message Agent wants to wait for transactions to be scanned into the stable queue, it updates sr_marker and waits for it to work its way through the system. The column in sr_queue_state is also called marker, and contains the most recent marker to be scanned from the transaction log.

Top of page  

Collection Contents Index How the Message Agent for Adaptive Server Enterprise works Error reporting and handling pdf/chap12.pdf