Collection Contents Index CHAPTER 12.  Administering SQL Remote for Adaptive Server Enterprise Running the Message Agent pdf/chap12.pdf

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

How the Message Agent for Adaptive Server Enterprise works


This section describes how the Message Agent for Adaptive Server Enterprise works. There are some significant differences between how the Message Agent for Adaptive Server Enterprise and the Message Agent for Adaptive Server Anywhere operate, which accommodate the different roles of the two servers.

For Info     For information on features of the Message Agent that are common to Adaptive Server Anywhere and Adaptive Server Enterprise, see Running the Message Agent.

Message Agent is ssremote 

The Message Agent for Adaptive Server Enterprise is the following executable:

Top of page  Scanning the transaction log

The Message Agent scans the Adaptive Server Enterprise transaction log in order to collect transactions to be sent to remote databases. It stores these transactions in a stable queue.

For Info     For more information about the stable queue, see The stable queue. For more information about how the Message Agent uses the stable queue, see Message Agent operation phases.

The SQL Remote Message Agent uses the same transaction log scanning interface as the Adaptive Server Enterprise Log Transfer manager (LTM). Adaptive Server Enterprise maintains a truncation point, which is an identifier for the oldest page in the transaction log needed by the replication system.

The SQL Remote Message Agent sets the truncation point as soon as transactions are scanned from the transaction log and committed in the stable queue. This allows the dump transaction command to reclaim space in the transaction log as soon as possible. The Message Agent does not wait until confirmation is received from remote databases before setting the truncation point.

Message Agent must be run to reclaim log space    
The Message Agent must be run frequently enough to prevent the transaction log from running out of space. The dump transaction command does not reclaim space from pages after the truncation point.

Replication Server and SQL Remote 

Using SQL Remote on an Adaptive Server Enterprise database participating in a Replication Server setup may involve other considerations. If your database has a replication agent (LTM) running against it, then you need to use the SQL Remote Open Server as an additional component. Adaptive Server Enterprise databases have replication agents running against them in the following circumstances:

If the database is participating in a Replication Server setup as a replicate site, and no asynchronous procedure calls are being used, there is no need for the SQL Remote Open Server.

For Info     For more information about the SQL Remote Open Server, see Using SQL Remote with Replication Server.

Top of page  The stable queue

The Message Agent for Adaptive Server Enterprise uses a stable queue to hold transactions until they can be deleted. A stable queue is a pair of database tables that hold messages that may still be needed by the replication system.

SQL Remote for Adaptive Server Anywhere does not use a stable queue.

Stable queue not identical to Replication Server stable queue    
Sybase Replication Server also uses stable queues as storage areas for replication messages. The Replication Server and SQL Remote stable queues perform similar functions, but are not the same thing.

Stable queue location 

The stable queue may be kept in the same database as the tables being replicated, or in a different database. Keeping the stable queue in a separate database complicates the backup and recovery plan, but can improve performance by putting the stable queue workload on separate devices and/or a separate Adaptive Server Enterprise server.

Do not modify the stable queue directly    
The stable queue is maintained by and for the Message Agent. You should not modify the stable queue directly.

Stable queue tables 

The stable queue consists of two tables. The sr_transaction table has one row for each transaction in the stable queue, and the supplementary table sr_queue_state has a single row, which stores persistent global information about the state of the stable queue.

For Info     For a description of each of the columns of these tables, see Stable Queue tables.

Top of page  Message Agent operation phases

The Message Agent has the following phases of execution:

The Message Agent does not scan the transaction log for the stable queue.

For Info     For information on running multiple copies of the Message Agent to carry out these tasks, see Running multiple Message Agents.

Top of page  

Collection Contents Index CHAPTER 12.  Administering SQL Remote for Adaptive Server Enterprise Running the Message Agent pdf/chap12.pdf