Updating the set of available table filters in a publication v7
After you define a set of available table filters in the publication of a single-master replication system or a multi-master replication system, you can update the set by adding filter rules, removing filter rules, or modifying filter rules.
For background on table filters, see:
Table settings and restrictions for table filters for table setup requirements for a log-based replication system as well as general restrictions on the use of table filters.
Updating the set of available table filters in a publication has the following implications:
- After you add filter rules to a publication, you must then enable these filter rules on the subscriptions or primary nodes that you want these filter rules to affect. See Enabling and disabling table filters on a subscription and Enabling and disabling table filters on a primary node for details.
- Removing filter rules from a publication also deletes the rules from any associated subscription or primary node on which they were enabled. You don't need to modify the subscriptions or primary nodes to disable the filter rules after you remove them from the publication.
- Modifying filter rules (changing the filter name or filter clause) applies the changes to any subscriptions or primary nodes on which the filter rules are enabled. You don't need to make any changes in the associated subscriptions or primary nodes.
After you complete your updates to the set of available table filters in the publication and enable or disable the filter rules on the target subscriptions or primary nodes, perform a snapshot replication. Perform this snapshot on any subscription or primary node affected by an updated filter rule to ensure that the content of the targeted subscription tables or primary node tables is consistent with the current set of filter rules enabled on those tables.
To update the set of available filter rules in a publication:
Make sure the publication server whose node is the parent of the publication you want to change is running and registered in the Replication Server console you're using. See Registering a publication server to learn how to start and register a publication server.
For SMR: Select the Publication node of the publication whose set of available filters you want to update.
For MMR: Select the Publication node under the Publication Database node representing the primary definition node.
Select Publication > Update Publication > Update Filters.
In the Update Filters dialog box, the set of all available filter rules defined in the publication are listed on the Table Filters tab.
To add a filter rule, from the Table/View list, select the table or view to which you want to add a filter and select Add Filter.
In the Add Filter dialog box, fill in the information as needed. See Adding a publication for more details on adding filter rules in a single-master replication system. See Adding a publication for a multi-master replication system.
To remove a filter rule, select the filter rule you want to remove and select Remove Filter.
To modify the filter name or filter clause of a filter rule listed in the Table Filters tab, double-click the cell of the filter name or filter clause you want to change and enter the new text.
When you are satisfied with the updated set of available table filters, select Update.
A confirmation appears recommending that you perform a snapshot replication to any subscription or primary node on which you intend to enable the change in filtering criteria. Select OK.
You can selectively enable any new filter rules to the corresponding tables of the associated subscriptions or primary nodes. See Enabling and disabling table Filters on a subscription and Enabling and disabling table filters on a primary node for details.