Replicating a Table
Now that the basic replication relationships between servers have been established by the preceding example, we will show how easy it is to set up replication of a table from one server to another. In this example, the server TERRIER will publish the titles and publishers tables from the pubs database, and the server COLLIE will subscribe to them.
To replicate tables from TERRIER to COLLIE
-
Publish the titles and publishers tables by creating the publication newpub.
-
Subscribe the incollie database on COLLIE to the newpub publication from TERRIER.
-
From the Server Manager window, choose COLLIE, and then from the toolbar, choose the Manage Subscriptions button. The Manage Subscriptions dialog box appears.
-
Open the published database tree for TERRIER (choose the "" box next to the server name), and then open the publications list for the pubs database (choose the "" box next to the database).
-
Select the newpub publication, and then choose Subscribe. The Subscription Options dialog box appears.
-
From the list in the Destination Database box, select the incollie database.
-
Choose OK. The Manage Subscription dialog box returns.
-
Choose Close.
This replication example is now set up. If the default synchronization setting for the publication newpub was not changed, synchronization will occur within five minutes. Synchronization will copy the schema and data from the published tables to the destination database. After that, replication of changes to table data will occur as changes are made.