Enabling filters on a subscription or non-MDN node (enablefilter) v7

The enablefilter command enables one or more filter rules on a single-master replication system subscription or on a multi-master replication system primary node other than the primary definition node.

Use the enablefilter command when you want to apply a filter rule to a subscription or a non-MDN node, but the filter rule didn't yet exist or it wasn't included with the subscription or the non-MDN node when these components were created.

Synopsis

-enablefilter
  -repsvrfile pubsvrfile
{ -subname subname | -dbid dbid }
  -filterids filterid_1 [ filterid_2 ] ...

Enabling a filter rule applies it to the specified, target subscription or non-MDN node and thus filters the data during replication from the source table to the target table.

See Table filters for more information.

Before enabling a filter rule, define it in the source publication in one of several possible ways:

For SMR:

For MMR:

Enable the filter rule as follows:

For SMR: Use the enablefilter command or the Replication Server console (see Enabling and disabling table filters on a subscription).

For MMR: Use the enablefilter command or the Replication Server console (see Enabling and disabling table filters on a primary node.

After you enable a filter rule, it filters the data during replication from the source table to the target table. You can disable a filter rule so that it no longer filters the data during replication to the target table (see Disabling filters on a subscription or non-MDN node).

Parameters

pubsvrfile

The file containing the publication server login information.

subname

For SMR only: The name of the subscription containing the tables on which to enable the filter rules.

dbid

For MMR only: The publication database ID of the non-MDN node containing the tables on which to enable the filter rules.

filterid_n

One or more filter IDs separated by space characters. These IDs identify the filter rules from the set of available table filters. You can enable these filters on the corresponding tables in the SMR subscription specified by subname or in the MMR non-MDN node specified by dbid. Use the printpubfilterslist command to obtain the filter IDs for the available filter rules in the publication (see Printing a list of filters in a publication).

Examples

This example enables a filter rule on a subscription of a single-master replication system.

$ java -jar edb-repcli.jar -enablefilter -repsvrfile ~/pubsvrfile.prop \
>   -subname analysts_managers_sub \
>   -filterids 47
Enabling filters...
Filter rule(s) updated successfully.

This example enables multiple filter rules on a primary node that isn't the primary definition node of a multi-master replication system.

$ java -jar edb-repcli.jar -enablefilter -repsvrfile ~/pubsvrfile.prop \
>   -dbid 139 \
>   -filterids 8 16
Enabling filters...
Filter rule(s) updated successfully.