When you use parameterized filters, you can control how the filters are processed by merge replication by specifying either the use partition groups option or the keep partition changes option when you create a publication. These options improve the synchronization performance for publications with filtered articles by storing additional metadata in the publication database. You can control how the data is shared among Subscribers by setting partition options when you create an article.
For more information about these requirements, see Parameterized Row Filters. For definitions of the filtering options for @keep_partition_changes and @use_partition_groups, see sp_addmergepublication.

To specify merge filter optimizations when creating a new publication

To view and modify merge filter behaviors for an existing publication
-
(Optional) At the Publisher on the publication database, execute sp_helpmergepublication, specifying @publication. Note the value of keep_partition_changes and use_partition_groups in the result set.
-
(Optional) At the Publisher on the publication database, execute sp_changemergepublication. Specify a value of use_partition_groups for @property and either true or false for @value.
-
(Optional) At the Publisher on the publication database, execute sp_changemergepublication. Specify a value of keep_partition_changes for @property and either true or false for @value.
Note: |
|---|
|
When enabling keep_partition_changes, you must first disable use_partition_groups and specify a value of 1 for @force_reinit_subscription.
|
-
(Optional) At the Publisher on the publication database, execute sp_changemergearticle. Specify a value of partition_options for @property and the appropriate value for @value. See sp_addmergearticle for definitions of these filtering options.
-
(Optional) Start the Snapshot Agent to regenerate the snapshot if necessary. For information about which changes require a new snapshot to be generated, see Changing Publication and Article Properties.