Last modified on 25th September 2018

Collation conflict

If you encounter collation conflict during installation it means that your server’s collation is different to the SQLWATCH database collation and SQL cannot handle string comparisons.

We use Latin1_General_CI_AS  collation

There are 2 ways to solve this:

Option 1: Manually create an empty database

Create a new database called SQLWATCH either via SSMS or via TSQL:

The database will be created in the default location as defined in your server parameters

Once you have an empty database you can now upgrade using the standard upgrade DACPAC method. This will keep the source database collation.

If you are still having problems, try deploying via command line with additional parameter as in

This setting dictates how the database’s collation is handled during deployment; by default, the target database’s collation will be updated if it does not match the collation specified by the source. When this option is set, the target database’s (or server’s) collation should be used.

/p: CompareUsingTargetCollation=(BOOLEAN)

Option 2: Rebuild project

You can download the Visual Studio project from GitHub and edit collation in the database properties and rebuild the project. This will generate new DACPAC or you can deploy directly from Visual Studio as per the installation instructions.