Chapter 10. SQL Remote Administration
The message tracking system
SQLRemote has a message tracking system to ensure that all replicated
operationsare applied in the correct order, no operations are missed, and no
operationis applied twice.
Messagesystem failures may lead to replication messages not reaching their
destination,or reaching it in a corrupt state. Also,messages may arrive at
theirdestination in a different order from that in which they were sent. This
sectiondescribes the SQL Remote system for detecting and correcting
messagesystem errors, and for ensuring correct application of messages.
Ifyou are using an e-mail message system, you should confirm that e-mail is
workingproperly between the two machines if SQL Remote messages are
notbeing sent and received properly.
TheSQL Remote message tracking system is based on status information
maintainedin the remoteuserSQL Remote system table. The table is
maintainedby the Message Agent. TheMessage Agent at a subscriber
databasesends confirmation to the publisher database to ensure that
remoteuseris maintained properly at each end of the subscription.
ForAdaptive Server Anywhere, the remoteuser table is the
sys.sysremoteusersystem table. ForAdaptive Server Enterprise, this is the
sr_remoteusertable.

Status information in the remoteuser table

Theremoteuser SQL Remote system table contains a row for each
subscriber,with status information for messages sent to and received by that
subscriber. At the consolidated database, remoteusercontains a row for
eachremote user. Ateach remote database, remoteuser contains a single
rowmaintaining information for the consolidated database. (Recallthat the
consolidateddatabase subscribes to publications from the remote database.)
Theremoteuser SQL Remote system table at each end of a subscription is
maintainedby the Message Agent.

Trackingmessages by transaction log offsets

Themessage-tracking status information takes the form of offsets in the
transactionlogs of the publisher and subscriber databases. EachCOMMIT is
markedin the transaction log by a well-defined offset. Theorder of
transactionscan be determined by comparing their offset values.
Messageorder ing Whenmessages are sent, they are ordered by the offset of the last COMMIT
ofthe preceding message. Ifa transaction spans several messages, there is a
237