Troubleshooting
SQL Server
Error: Cannot resolve collation conflict between SQL_Latin1_General_CP1_CI_AS and Latin1_General_CI_AS
9 min
this guidance is provided for informational purposes only collation changes can have wide reaching impact on your sql environment always consult with your activate representative and sql dba before proceeding with any of the steps outlined below, and ensure a full database backup is taken summary this error occurs when there is a mismatch in sql server collation settings between the activate database, tempdb, or specific table columns it commonly surfaces after upgrades or when environments are built with differing default collations symptoms cannot resolve the collation conflict between 'sql latin1 general cp1 ci as' and 'latin1 general ci as' job logs show errors similar to error saving cache information behaviour may differ between environments (e g works in lab but fails in qa/production) cause the issue is caused by inconsistent collation settings across sql server instance (server level collation) tempdb (inherits server collation) activate database individual table columns when sql operations involve objects with different collations, sql server cannot reconcile string comparisons, resulting in this error common scenario activate db uses one collation (e g sql latin1 general cp1 ci as) sql server / tempdb uses another (e g latin1 general ci as) queries involving temp tables or joins trigger the conflict resolution options option 1 align server and database collation engage a sql dba to align the sql server instance collation with the activate database steps select databasepropertyex('activatedb', 'collation') as databasecollation; confirm current collations select serverproperty('collation') as servercollation; if mismatched, update server or database collation as appropriate changing server collation is complex and may require rebuild of system databases option 2 update activate database collation use alter database to change the activate db collation microsoft reference https //learn microsoft com/en us/sql/t sql/statements/alter database transact sql example alter database activatedb collate sql latin1 general cp1 ci as; important considerations script requirements vary depending on activate version does not automatically update existing column level collations must be coordinated with an activate representative requires a full database backup before execution option 3 fix column level collation mismatches even after database level changes, individual columns may still have conflicting collations example identified issue jobattachments filename column using server collation instead of database collation check column collation select name, collation name from sys columns where object id = object id('jobattachments'); fix example alter table jobattachments alter column filename nvarchar(255) collate latin1 general ci as; best practice ensure server, tempdb, and activate db collations match wherever possible validate collation consistency after new environment builds sql server installs activate upgrades always perform a full database backup before making collation changes engage your activate representative for version specific guidance additional notes lab environments may not reproduce the issue if collations were originally aligned tempdb collation cannot be directly changed—it follows the sql server instance collation reinstalling sql server is generally not required unless correcting server level collation is necessary