简体   繁体   English

更改主数据服务的排序规则

[英]Change Collation on Master Data Services

I have a SQL Server 2017 Master Data Services installed on SQL Server 2017 .我在 SQL Server 2017 上安装了SQL Server 2017 Master Data Services During installation it was setup to use the default server collation.在安装过程中,它被设置为使用默认的服务器排序规则。 We now have been using MDS via the excel plugin and the users wish to clean the text.我们现在一直通过 excel 插件使用 MDS,用户希望清理文本。 However, when setting the text to proper cases, the publish action returns as if the data was unchanged.但是,当将文本设置为适当的大小写时,发布操作会返回,就好像数据未更改一样。 The collation on the MDS database is Latin1_General_CI_AS . MDS 数据库上的排序规则是Latin1_General_CI_AS

My questions is what is the best way to enable case sensitivity on MDS?我的问题是在 MDS 上启用区分大小写的最佳方法是什么? Is it just changing the collation (say, to Latin1_General_CS_AS )?它只是更改排序规则(例如,更改为Latin1_General_CS_AS )?

When you've setup the MDS configuations, you would have perhaps ticked Case Sensitive.当您设置 MDS 配置时,您可能会勾选区分大小写。

在此处输入图像描述

Just go back in there and fix it.只需将 go 放回那里并修复它。

To me, that is the best way .对我来说,这是最好的方式 Make sure though that all objects in the database are also of the same collation:确保数据库中的所有对象也具有相同的排序规则:

Check Server Collation检查服务器排序规则

SELECT SERVERPROPERTY('COLLATION')

Check Database Collation检查数据库排序规则

SELECT DATABASEPROPERTYEX('AdventureWorks', 'Collation') SQLCollation;

Check Column Collation检查列排序规则

select table_name, column_name, collation_name
from INFORMATION_SCHEMA.COLUMNS
where table_name = @table_name

If the database has restrictions from the DBA, or you don't have all the priveleges, you may have no choice, but to specify the collation in the code yourself:如果数据库受到 DBA 的限制,或者您没有所有权限,您可能别无选择,只能自己在代码中指定排序规则:

SELECT * FROM tbl where x = 'y' COLLATE sql_latin1_general_cp1_cs_as

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

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