Dela via


How to: Specify That a Merge Table Article is Download-Only (Replication Transact-SQL Programming)

Download-only articles are designed for applications with data that is not updated at Subscribers. For more information, see Optimizing Merge Replication Performance with Download-Only Articles.

To specify that a new merge table article is download-only

  • Execute sp_addmergearticle, specifying a value of 1 or 2 for the parameter @subscriber_upload_options. The numbers correspond to the following behavior:

    • 0 - No restrictions (default). Changes made at the Subscriber are uploaded to the Publisher.

    • 1 - Changes are allowed at the Subscriber, but they are not uploaded to the Publisher.

    • 2 - Changes are not allowed at the Subscriber.

      Note

      If the source table for an article is already published in another publication, the value of @subscriber_upload_options must be the same for both articles.

      Note

      If you change the article type to download-only after subscriptions have been initialized, all client subscriptions that receive the article must be reinitialized.

To modify an existing merge table article to be download-only

  1. To determine if an article is download-only, execute sp_helpmergearticle. Note the value of upload_options for the article in the result set.

  2. If the value returned in step 1 is 0, execute sp_changemergearticle, specifying a value of subscriber_upload_options for @property, a value of 1 for @force_invalidate_snapshot and @force_reinit_subscription, and a value of 1 or 2 for @value, which corresponds to the following behavior:

    • 1 - Changes are allowed at the Subscriber, but they are not uploaded to the Publisher.

    • 2 - Changes are not allowed at the Subscriber.

      Note

      If the source table for an article is already published in another publication, the download-only behavior must be the same for both articles.