Using publications

A publication lets you collect replication definitions for the same or related tables and/or stored procedures and then subscribe to them as a group. You collect replication definitions in a publication at the source Replication Server and subscribe to them with a publication subscription at the destination Replication Server.

With publications, you monitor the status of one publication subscription for a set of tables and procedures.

The following steps summarize the procedure for replicating data using publications.

  1. Create or select the replication definitions to include in the publication.

  2. Create the publication.

  3. Create articles that reference the replication definitions you have chosen.

  4. Validate the publication.

  5. Create a subscription for the publication.

NoteA replicate database can subscribe to different replication definitions of the same primary table directly or through publications—as long as each replication definition references a different table in the replicate database.

To use publications, the primary Replication Server must be version 11.5 or later. To use publication subscriptions, the replicate Replication Server and the route from the primary Replication Server and the replicate Replication Server must be version 11.5 or later.

When you use publications, you create and manage the following objects:

In general, you manage publications and publication subscriptions in the same way as you do replication definitions and subscriptions. However, when you create a publication, you can specify the subset of rows that the replicate table receives by including a where clause in the article—not in the subscription.

You can create and manage publications using the command line. The following sections provide detailed instructions for creating publications at the command line.

Refer to Chapter 10, “Managing Replicated Functions” for more information about publications for stored procedures. Refer to Chapter 11, “Managing Subscriptions” for information about creating and managing publication subscriptions.