Blitz Result: Database vs Server Collation Mismatch

SQL Server lets us store data in different collations, and we can set this at both the overall server level and at the individual database level.  This gets a little tricky when we join between different databases, or even when we create a temp table and then compare the temp table data to a user database in a different collation.

This section of sp_Blitz checks the collations in sys.databases against the server property for collation, and alerts if they’re different.  It was originally contributed by Thomas Rushton (Blog@ThomasRushton).

To Fix the Problem

You can change the collation level of a database with T-SQL or SSMS, but that doesn’t affect the collation of any objects that were already created inside that database.  Unfortunately, to change collation of existing data, things are a lot tougher.

Return to sp_Blitz or Ask Us Questions