Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Risk and effects of changing database collation in SQL Server

Since my SQL Server 2012 instance is using a collation (Latin1_General_CI_AS) different to some DBs in use (SQL_Latin1_General_CP1_CI_AI), I was evaluating possible risks of changing the collation of the databases using a different collation than the SQL Server instance.

I retrieved hundreds of procedure to perform this step. What is not clear for me is to understand if there are some constraints or risk on performing an action such this.

Thanks for any replies.

like image 522
Luca Avatar asked Feb 26 '16 14:02

Luca


1 Answers

To understand the risk means you need to understand the difference. We can't tell you the impact in your system. The difference is the new collation would start finding matches where it didn't before.

Consider this query using your current collation. This will not return a row because those two values are not equal.

select 1
where 'e' = 'é' collate Latin1_General_CI_AS

Now since both of those characters are the letter 'e' but with different accents they will be equal when you ignore the accent.

select 1
where 'e' = 'é' collate SQL_Latin1_General_CP1_CI_AI  

Again there is no way we can tell what the potential problems might be in your system because we don't know your system.

like image 84
Sean Lange Avatar answered Sep 28 '22 11:09

Sean Lange