I have moved one of our databases (DB1) from SQL Server 2008 to 2012 and when I run the stored procedures I get the following error
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation
I changed the collation on the database using
ALTER DATABASE [optimiser] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [optimiser] COLLATE SQL_Latin1_General_CP1_CI_AS
ALTER DATABASE [optimiser] SET MULTI_USER
But I still get the error whenever the stored procedures run. I believe because the SP is using a join to another database (GE's ihistorian) and it has a collation mismatch. IS there anyway to resolve this.
On the old server DB1 was set as Latin1_General_CI_AS
and this works fine. The new location for the DB has a default of SQL_Latin1_General_CP1_CI_AS
. Is it worth changing the collation n DB1 on the new server back to Latin1_General_CI_AS
??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…