SQL Compare

SQL Compare

How to deploy a database plus static data using SQL Compare and SQL Data Compare

We can use the SQL Compare Pro command line with PowerShell to automate the process of creating a new build script for a version of the database, from the object scripts in the VCS. However, what if we want to include static data in the build? This article describes how to the use the SQL […] Read more

SQL Compare

Automating database deployments to and from source control using SQL Compare and PowerShell

Our goal is to show how to use SQL Compare Pro command line with PowerShell to automate the following processes: Getting a new database into version control, or updating the object scripts in the VCS to reflect the latest database changes Creating a new build script for a database version, from the object scripts in […] Read more

SQL Compare

Automatically keeping ‘hotfix’ and production database schemas in sync

In this article, I’ll be showing you how to automatically compare the schema of two versions of the same database, and then subsequently deploy to the target database any differences detected in the source database. In other words, for any database object that exists in both databases but with differences, the object’s definition in the […] Read more

SQL Compare

How to use custom filters in SQL Compare

I used to work at JD Edwards, and in one of our ERP products we had a cumbersome database schema. There were tables like this: These were the tables that held various information in the system. Trying to find data was an exercise in frustration, even for those of us that were familiar with it. […] Read more

SQL Compare

How to build multiple database versions from the same source: pre-deploy migration scripts

This is the third post in a three-part series that explains how to maintain a single declarative source of truth in version control for a SQL Server database, which can be deployed to multiple environments, despite the fact that some environments have known customizations. In part 1, I explained how to manage objects that exist […] Read more

SQL Compare

Automating DacPac deployments using the SQL Compare command line and PowerShell

My previous article, How to compare two DacPacs using SQL Compare, described how to use the SQL Compare GUI to compare two DacPacs, and generate a synchronization script. This article takes it one step further, showing how to use PowerShell and the SQL Compare command line to automate the generation of a synchronization script, to […] Read more

SQL Compare

Eliminating ‘noise’ from database deployment scripts using SQL Compare project options

A database comparison tool like SQL Compare removes a lot of the pain behind the task of comparing SQL Server database schemas, generating a synchronization script, and then deploying the changes from the source to the target database. However, depending on how you have SQL Compare configured, there may still be some manual work to […] Read more

SQL Compare

How to build multiple database versions from the same source: post-deploy scripts

This is the second post in a three-part series that explains how¬†to use SQL Compare to maintain a single source of truth in version control for a SQL Server database which can be deployed to multiple production instances, despite the fact that some production instances have customizations. My previous article explained how to use SQL […] Read more

SQL Compare

Deploying schema changes to multiple databases using the SQL Compare command line

Sometimes, you need to synchronize multiple target databases with the same source database, or with the source code for that database, in version control. You may need to push out the schema changes to ten copies of the database on ten different servers, as part of a deployment, for example. Or there may be cases […] Read more

SQL Compare

How to build multiple database versions from the same source: object filters

I’ve worked with several companies who maintain databases in multiple data centers, each one holding the data for a particular region, and each database serving multiple applications. Over time, for various business or legal reasons, it often becomes necessary to apply updates to certain individual data centers. The right, but hard, way to do this […] Read more