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.
Create or select the replication definitions to include in the publication.
Create the publication.
Create articles that reference the replication definitions you have chosen.
Validate the publication.
Create a subscription for the publication.
A 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:
Articles – replication definition extensions for tables or stored procedures that let you put table or function replication definitions in a publication. Articles may or may not contain where clauses, which specify a subset of rows that the replicate database receives.
Publications – groups of articles from the same primary database.
Publication subscriptions – subscriptions to a publication. When you create a publication subscription, Replication Server creates a subscription for each of the publication’s articles. Publication subscriptions do not contain where clauses.
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.