Travails of an ungeeker

Friday, September 01, 2006

Ouch my SQL Server collation orders are different and causing a collation conflict error

You get the message: "Cannot resolve collation conflict " when you have multiple databases with different collation orders.

If one database was created in SQL 7.0 days, and took the default collation order you ended up with:
SQL_Latin1_General_Cp1_CI_AS

Then you created another database in SQL 2000, and took the default collation order you ended up with:
Latin1_General_CI_AS

Now you have a query, stored procedure or function call between these databases and you've got the conflict.

All the DB servers from DEV through to PROD should be set to the same database default to reduce this situation. If you've got a mixed up environment then you'll be coding around it forever, so bite the bullet and standardise your collation sequences everywhere.

There's a tool I haven't tried to fix this here:
http://www.codeproject.com/vb/net/ChangeCollation.asp

0 Comments:

Post a Comment

<< Home