sp_check_dynamic_filters (Transact-SQL)

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Displays information on parameterized row filter properties for a publication, in particular the functions used to generate a filtered data partition for a publication and whether the publication qualifies for using precomputed partitions. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

Syntax


sp_check_dynamic_filters [ @publication = ] 'publication'  

Arguments

[ @publication= ] 'publication'
Is the name of the publication. publication is sysname, with no default.

Result Sets

Column name Data type Description
can_use_partition_groups bit Is if the publication qualifies for using precomputed partitions; where 1 means that precomputed partitions can be used, and 0 means that they cannot be used.
has_dynamic_filters bit Is if at least one parameterized row filter has been defined in the publication; where 1 means that one or more parameterized row filters exist, and 0 means that no dynamic filters exist.
dynamic_filters_function_list nvarchar(500) List of functions used to filter articles in a publication, where each function is separated by a semi-colon.
validate_subscriber_info nvarchar(500) List of functions used to filter articles in a publication, where each function is separated by a plus sign (+).
uses_host_name bit If the HOST_NAME() function is used in parameterized row filters, where 1 means that this function is used for dynamic filtering.
uses_suser_sname bit If the SUSER_SNAME() function is used in parameterized row filters, where 1 means that this function is used for dynamic filtering.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_check_dynamic_filters is used in merge replication.

If a publication has been defined to use precomputed partitions, sp_check_dynamic_filters checks for any violations of the restrictions of precomputed partitions. If any are found, an error is returned. For more information, see Optimize Parameterized Filter Performance with Precomputed Partitions.

If a publication has been defined as having parameterized row filters, but no parameterized row filters are found, an error is returned.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_check_dynamic_filters.

See Also

Manage Partitions for a Merge Publication with Parameterized Filters
sp_check_join_filter (Transact-SQL)
sp_check_subset_filter (Transact-SQL)