Using filters

This page applies to DLM Dashboard 1.5.1 and later.

You can ignore changes to objects you're not interested in by adding a filter file to your pipeline. The file contains rules to ignore objects by name or type. Filtered objects won't trigger updates or drift, and aren’t included in email notifications or reported on the Review page.

The filter file must contain valid XML and have a .scpf extension. You can create filters using SQL Compare or SQL Source Control, write your own, or download and edit this .scpf example file

Some changes are ignored by default and aren't affected by custom filters.

Create a filter in SQL Compare or SQL Source Control

DLM Dashboard supports filters created using SQL Compare or SQL Source Control:

Use an example filter

We've provided a .scpf example file for you to download, and details of how to customize it. 

Ignore objects by name

In this example, you'll update the filter file to ignore changes to objects called IGNORE, or that start with TEMP.

  1. Click here to download the .scpf example file. 
  2. Open the file in a text editor.
  3. At lines 12 to 15, replace:

    <None version="1">
    <Include>True</Include>
    <Expression>TRUE</Expression>
    </None>

    with:

    <None version="1">
    <Include>False</Include>
    <Expression>(@NAME = 'IGNORE') OR (@NAME LIKE 'TEMP%')</Expression> <!-- Excludes objects called IGNORE and objects beginning with TEMP -->
    </None>

    The % is a wildcardIgnore multiple objects using the boolean operators AND / OR 

  4. Save the filter with the extension .scpf, then add it to DLM Dashboard. See Add a filter.

Ignore objects by type

In this example, you'll update the filter file to include or ignore changes to stored procedures.

  1. Click here to download the .scpf example file.  
  2. Open the file in a text editor.

  3. At lines 108 to 111, replace:

      <StoredProcedure version="1">
            <Include>True</Include>
            <Expression>TRUE</Expression>
          </StoredProcedure>

    with:

      <StoredProcedure version="1">
            <Include>True</Include>
            <Expression /> <!-- Excludes changes to stored procedures -->
          </StoredProcedure>
  4. Save the filter with the extension .scpf, then add it to DLM Dashboard. See Add a filter.

Add a filter

  1. On the pipeline you want to apply the filter to, click Filter objects:
  2. Click Choose file and select the .scpf file. 
    By default, SQL Compare stores filter files in %USERPROFILE%\Documents\SQL Compare\Filters
  3. Click Apply.
    DLM Dashboard uploads the filter and applies it to the databases in your pipeline. 

When you add a filter, DLM Dashboard detects a schema change, takes a snapshot, and compares it with the previous schema version. This may take a few minutes.

Once you apply the filter, the change may show as database drift.

Edit a filter

To change the filter file that already applies to a pipeline:

  1. Click Download.
  2. Open the file in a text editor and update the rules. 
    For examples, see Ignore objects by name and Ignore objects by type
  3. Save the filter with the extension .scpf.
  4. Remove the filter file that's currently applied to the pipeline. To do this, on the dashboard, click Remove
  5. Add the edited filter to DLM Dashboard. See Add a filter.

When you remove and then add a filter, DLM Dashboard detects a schema change, takes a snapshot, and compares it with the previous schema version. This may take a few minutes.

Once you apply the filter, the change may show as database drift.

Creating new pipelines

When you move a database from a filtered pipeline to a newly created pipeline, the filter file is applied to the new pipeline. When you move a database to an existing pipeline, this won't affect any filters on it - the database will use any filter on to the pipeline it moves to.


Didn't find what you were looking for?