Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

HP1979 26 Reputation points
2021-05-18T16:25:06.677+00:00

Hello All,

Need urgent help on this. We have applied latest sql patches on one of the server (SQL 2014, SP3, CU4) and somehow we were not able to start the SQL due to following error.

Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 200, state 7, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
Error: 3417, Severity: 21, State: 3.
Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it.

So, i have started the server with Trace flag 902 and run the script msdb110_upgrade script and it failed with
Msg 468, Level 16, State 9, Procedure #syscollector_upload_package, Line 37659
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the not equal to operation.

Can anyone please help to fix this issue?

97633-error.png

SQL Server | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.8K Reputation points MVP Volunteer Moderator
    2021-05-18T21:51:39.883+00:00

    I'm looking at the script, and what is weird is that I can't see anything in #syscollector_upload_package that could cause a collation conflict. There is a little more potential in sp_sqlagent_get_perf_counters.

    Are you saying that you ran sqlservr with the -q option? Was this before of after the failed upgrade?

    I get a feeling that there is a mix of collation in your system databases that should not be there. What does SELECT serverproperty('Collation') return? What does SELECT name, collation FROM sys.databases WHERE database_id <= 4 return?

    To be honest, I think your best option may be to open a support case, even if the bill will be stiff. But it can take quite a while to sort this out in a public forum.

    1 person found this answer helpful.
    0 comments No comments

  2. HP1979 26 Reputation points
    2021-05-18T16:29:45.103+00:00

    Update:I performed the steps described below with option 2 and run the script msdb110_upgrade script and it failed with following error message.

    https://www.mssqltips.com/sqlservertip/3519/changing-sql-server-collation-after-installation/

    Msg 468, Level 16, State 9, Procedure sp_sqlagent_get_perf_counters, Line 5395Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AI" in the equal to operation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.