Collation conflict when upgrading the xDB Reference Data database


Description

Running the "SXP_referencedata_Part2.sql" script to upgrade the xDB Reference Data database might fail with the following error:

Creating [xdb_refdata].[GetByDefinitionTypes]...
Msg 468, Level 16, State 9, Procedure GetByDefinitionTypes, Line 147 [Batch Start Line 272]
Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
Creating [xdb_refdata].[GetDefinitions]...
Msg 468, Level 16, State 9, Procedure GetDefinitions, Line 75 [Batch Start Line 463]
Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

The issue occurs when upgrading the Sitecore XP instance that is deployed in Azure App Service.

Solution

To resolve the issue, download and run the "SXP_referencedata_Part2 - modified.sql" script instead of the "SXP_referencedata_Part2.sql" script.