Using the "Red Gate Database (Beta)" with filter files

Hello. We’ve recently started migrating to using the redgate method as part of the package download, outside of a new step (seems cleaner, and faster)

We want to include our .scpf file and can’t seem to find documentation on how to do it.

Is there a way to accomplish this?


Thanks for getting in touch! We will need some more information to get to the bottom of this one.

Is the RedGate method you are referring to a Library step template or a custom script?
Could you also let us know what version of Octopus you are currently running?

Looking forward to hearing from you.


Hi Daniel,
We’re running Octopus 3.3.17 and it’s the “Red Gate Database (Beta)” option in the ‘Deploy Package’ step.


Thanks for getting back! The feature you are using unfortuantely does not have the option to include a .scpf file. I believe the best option would be to use the Red Gate Create Database step template.

This template has a parameter defined for calling your .scpf file:

Filter path (optional)
Specify the location of a SQL Compare filter file (.scpf), which defines objects to include/exclude in the schema comparison. Filter files are generated by SQL Source Control.

Let me know if the template helps.


Hi Daniel,
Thank you. I’m currently using that step but it has an impact on the deployment timing. By using the built in red gate during package deployment, it will skip if it’s already been deployed. By using redgates, it causes the SQL Compare to happen every deployment, which can take a while due to the size of our databases


Sorry for the late reply! I had to ask around to find a solution here.

You could use the following to get the same behaviour:

Create a package containing your .scpf, and a “Deploy.ps1” file that has the same PowerShell as that step template that I linked to above
Deploy the package using a general “NuGet package step” in Octopus (not the “Red Gate Database (Beta)” step.
Since the script is in the Deploy.ps1 file inside the package, Octopus will automatically call it when it extracts the package.

Octopus will still check to see if the package has been deployed before running it, so you’ll get that desired behavior (not wanting to run SQL Compare every time unless you have a new package).

Hope this helps, let us know if you need any clarification. :slight_smile:

Best Regards,