当我试图将现有数据库(包括数据)的排序规则从ARABIC_CS_AS更改为PERSIAN_100_CS_AS时,出现了以下错误:

数据库"XXXX"的Alter失败.(Microsoft.SqlServer.Smo)

执行Transact-SQL语句或批处理时出现异常. (Microsoft.SqlServer.ConnectionInfo)

The object 'ItemTables' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.
The object 'CK_FilteredReportColumnFilters' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.
The object 'CK_FilteredReportColumnFilters_1' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.
The object 'CK_FilteredReportColumnFilters_2' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.
The object 'CK_Reports' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.

ALTER DATABASE失败.数据库‘XXXX’的默认排序规则不能设置为PERSIAN_100_CS_AS.(Microsoft SQL Server,错误:5075)

试图通过删除这些数据库对象来纠正提到的错误会导致转换过程中其他标题出现另一个错误.

有什么 idea 吗?有没有明确的解决方案来解决这个问题?

推荐答案

啊,这是SQL Server中最严重的问题之一:一旦创建了对象,就不能更改排序规则(对于表和数据库都是如此…).

您只能保存数据(不要使用bcp或备份实用程序,您需要将它们放置在类似文件类型的csv中…),删除数据库,使用正确的排序规则重新创建,然后将数据重新导入新数据库...

希望这有帮助.

Database相关问答推荐

为多个列 Select 最新的非空值

网络分区恢复后副本的更新数据发生了什么

从仅连接器电源查询制作图表

在 ScyllaDB 中查询 100 亿行(高基数)的效率

在哪里存储 PHP 应用程序的数据库登录凭据

add_index 到数据模型 - Ruby on Rails 教程

为什么引用 SQLite rowid 会导致外键不匹配?

关闭连接会自动关闭语句和结果集吗?

有没有办法为 2 个具有不同包名称的应用程序提供 1 个 Firebase 数据库?

SQL Server 中的Is Identity列属性是什么意思?

repeating groups是什么意思?

Spring Framework 中的默认隔离级别

Java 数据库连接池(BoneCP vs DBPool vs c3p0)

如何允许多个用户同时连接到我的 H2 数据库?

group by会自动保证order by吗?

为什么 MySQL 连接被许多连接错误阻止?

删除 PHP 中的所有小数

如何动态更改 Ruby on Rails 中所有模型的 Active Record 数据库?

我在哪里可以获得所有国家/地区的邮政编码?

PostgreSQL 的示例数据库