简体   繁体   English

在SQL Server中更改数据库排序规则的风险和影响

[英]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. 由于我的SQL Server 2012实例使用的排序Latin1_General_CI_ASLatin1_General_CI_AS )与使用中的某些数据库( SQL_Latin1_General_CP1_CI_AI )不同,因此我正在评估使用与SQL Server实例不同的排序SQL_Latin1_General_CP1_CI_AI更改数据库排序SQL_Latin1_General_CP1_CI_AI可能风险。

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. 感谢您的任何答复。

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. 现在,由于这两个字符都是字母“ e”,但是带有不同的重音,所以当您忽略重音时它们将是相等的。

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. 同样,由于我们不了解您的系统,因此我们无法告诉您系统中可能存在的潜在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM