Error: Cannot resolve collation conflict between SQL_Latin1_General_CP1_CI_AS and Latin1_General_CI_AS
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