Materializing and validating replicate articles

After you create a replicate article in a subscription, you must either materialize or validate the replicate article before you can start replication to the replicate object identified in the replicate article.

NoteYou must suspend the subscription before you materialize or validate a replicate article. See “Suspending and resuming subscriptions” for more information.

Materializing a replicate article for a table copies data from the primary object identified by the primary article to which the replicate article subscribes. Data is copied using the insert into ... select from command, and it is based on the subscribed fields and the where clause specified in the replicate article (if applicable).

StepsTo materialize a specific replicate article in a subscription

  1. Use sp_materializesub with the following syntax to specify the subscription and the name of the replicate article:

    sp_materializesub sub_name, rep_art
    

    where sub_name is the name of the subscription, and rep_art is the name of the replicate article.

StepsTo materialize all replicate articles in a subscription

  1. Use sp_materializesub with the following syntax to specify the subscription:

    sp_materializesub sub_name
    

    where sub_name is the name of the subscription.

If the replicate object identified in a replicate article already contains data synchronized with the primary object in the primary database, you can validate the replicate article instead of materializing it.

In the case of a replicate article for a stored procedure, the article needs only to be validated, and not materialized.

StepsTo validate a specific replicate article in a subscription

  1. Use sp_validatesub with the following syntax to specify the subscription and the name of the replicate article:

    sp_validatesub sub_name, rep_art
    

    where sub_name is the name of the subscription, and rep_art is the name of the replicate article.

StepsTo validate all replicate articles in a subscription

  1. Use sp_validatesub with the following syntax to specify the subscription:

    sp_validatesub sub_name
    

    where sub_name is the name of the subscription.