Chapter 2. SQL Remote Concepts

Publications and subscriptions

The data that is replicated by SQL Remote is arranged in publications. Each database that shares information in a publication must have a subscription to the publication.

Data is organized into The publication is a database object describing data to be replicated.

publicationsRemote users of the database who wish to receive a publication do so by subscribing to a publication.

A publication may include data from several database tables. Each table’s contribution to a publication is called an article. Each article may consist of a whole table, or a subset of the rows and columns in a table.

A two-table synchronization definition

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Article 1: all of

 

 

 

 

 

 

 

 

table A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

X

 

 

 

 

 

 

 

 

 

X

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

X

 

 

 

 

 

 

Article 2: some rows and

columns from table B

Periodically, the changes made to each publication in a database are replicated to all subscribers to that publication. These replications are called publication updates.

Messages are always Remote databases subscribe to publications on the consolidated database so

sent both waysthat they can receive data from the consolidated database. To do this, a subscription is created at the consolidated database, identifying the subscriber by name and by the publication they are to receive.

SQL Remote always involves messages being sent two ways. The consolidated database sends messages containing publication updates to remote databases, and remote databases also send messages to the consolidated database.

For example, if data in a publication at a consolidated database is updated, those updates are sent to the remote databases. And even if the data is never updated at the remote database, confirmation messages must still be sent back to the consolidated database, to keep track of the status of the

11

Page 29
Image 29
Sybase DC38133-01-0902-01 manual Publications and subscriptions, Two-table synchronization definition