How statements are replicated
SQLRemote replication is based on the transaction log, enabling it to
replicateonly changes to data, rather than all data, in each update. Whenwe
saythat SQL Remote replicates data, we really mean that

SQL Remote

replicates SQL statements that modify data

.
Onlycommitted
transactionsare
replicated
SQLRemote replicates only statements in committed transactions, to ensure
propertransaction atomicity throughout the replication setup and maintain a
consistencyamong the databases involved in the replication, albeit with
sometime lag while the data is replicated.
Primary keys Whenan UPDATE or a DELETE is replicated, SQL Remote uses the
primarykey columns to uniquely identify the row being updated or deleted.
Alltables being replicated must have a declared primary key or uniqueness
constraint. A unique index is not sufficient. The columns of the primary key
areused in the WHERE clause of replicated updates and deletes. Ifa table
hasno primary key, the WHERE clause refers to all columns in the table.
AnUPDATE is not
alwaysan UPDATE Whena simple INSERT statement is entered at one database, it is sent to
otherdatabases in the SQL Remote setup as an INSERT statement.
However,not all statements are replicated exactly as they are entered by the
clientapplication. Thissection describes how SQL Remote replicates SQL
statements. It is important to understand this material if you are to design a
robustSQL Remote installation.
TheMessage Agent is the component that carries out the replication of
statements.

Replication of inserts and deletes

INSERTand DELETE statements are the simplest replication case.
SQLRemote takes each INSERT or DELETE operation from the transaction
log,and sends it to all sites that subscribe to the row being inserted or
deleted.
Ifonly a subset of the columns in the table is subscribed to, the INSERT
statementssent to subscribers contains only those columns.
TheMessage Agent ensures that statements are not replicated to the user that
initiallyentered them.

Replication of updates

UPDATEstatements are not replicated exactly as the client application
entersthem. Thissection describes two ways in which the replicated
78