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][35].
Some changes are ignored by default and aren’t affected by custom filters.
DLM Dashboard supports filters created using SQL Compare or SQL Source Control:
We’ve provided a .scpf example file for you to download, and details of how to customize it.
In this example, you’ll update the filter file to ignore changes to objects called IGNORE
, or that start with TEMP
.
<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 wildcard. Ignore multiple objects using the boolean operators AND
/ OR
</h4>Ignore objects by type</h4>
In this example, you’ll update the filter file to include or ignore changes to stored procedures.
<StoredProcedure version="1">
<Include>True</Include>
<Expression>TRUE</Expression>
</StoredProcedure>
with:
<StoredProcedure version="1">
<Include>True</Include>
<Expression /> <!-- Excludes changes to stored procedures -->
</StoredProcedure>
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.
To change the filter file that already applies to a pipeline:
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.
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.
I created this video as part of a marketing campaign for DLM Dashboard, but also to function as an instructional resource. The idea is simple: DLM Dashboard is free to download, and you can set it up in two minutes, so why not give it a try?