Collection Contents Index SQL Remote system views CHAPTER 17.  Command Reference for Adaptive Server Anywhere pdf/chap16.pdf

Data Replication with SQL Remote
   PART 4. Reference
     CHAPTER 16. System Objects for Adaptive Server Enterprise       

Stable Queue tables


This section describes the database tables used by SQL Remote to define and manage the stable queue information. The stable queue may be kept in the same database as the SQL Remote database, or in a separate database.

The stable queue is used only by SQL Remote for Adaptive Server Enterprise.

Top of page  sr_queue_state table

Function 

A single row table that stores persistent global information about the state of the stable queue.

Columns 

Column

Description

version

SQL Remote version number

page_id

Transaction log page_id of the last entry scanned.

row_id

Transaction log row_id of the last entry scanned.

confirm_offset

The minimum value of the confirmation offsets received from all remote users. This value is used by the Message Agent to decide which transactions can be deleted from the stable queue.

commit_offset

The transaction log offset of the most recent transaction completed before the oldest incomplete transaction.

backup_offset

The transaction log offset of the last dump database or dump transaction command.

This information is used when the Message Agent is run with the -u command-line switch (replicate only backed up transactions).

sr_queue_state

The most recent incoming message that has been scanned into the stable queue. When a message is applied to the Adaptive Server Enterprise server, it sets the time_received column in sr_remoteuser. When the transaction log is scanned and the transactions from that message are scanned into the stable queue, it sets the time_received column of sr_queue_state.

The purpose of the column is co-ordination between one Message Agent that is scanning the transaction log continuously and another Message Agent that is receiving messages and sending messages in batch mode. When in batch mode, the Message Agent receives messages, waits for those messages to be scanned into the stable queue, and then sends messages. The waiting is done through the database by looking at the time_received column of sr_queue_state.

Top of page  sr_transaction table

Function 

This table has one row for each transaction in the stable queue.

Columns 

Column

Description

offset

The transaction log offset of the commit operation for the transaction. This value uniquely identifies each transaction

user_id

The remote user where the transaction originated. This column holds NULL if the transaction did not originate from a remote user.

The user_id column is used to ensure that actions are not replicated back to the remote site that entered them.

data

The transaction itself, in an internal representation.

Top of page  


Collection Contents Index SQL Remote system views CHAPTER 17.  Command Reference for Adaptive Server Anywhere pdf/chap16.pdf