如何在 amazon rds 上更改 sql 服务器 运行 的实例排序规则?

How to change Instance Collation of sql server running on amazon rds?

我 运行 SQL 服务器 2008R2 标准版和 RDS 实例。我需要更改服务器的 collation.So 我该如何更改?

基于documentation

Amazon RDS creates a default server collation for character sets when a SQL Server DB instance is created. This default server collation is currently English (United States), or more precisely, SQL_Latin1_General_CP1_CI_AS.

You can change the default collation at the database, table, or column level by overriding the collation when creating a new database or database object. For example, you can change from the default collation SQL_Latin1_General_CP1_CI_AS to Japanese_CI_AS for Japanese collation support. Even arguments in a query can be type-cast to use a different collation if necessary.

因此更改为所需的排序规则

  • database
    ALTER DATABASE db_name
    COLLATE collate_name;
    
  • column
    ALTER TABLE dbo.table_name ALTER COLUMN col_name
    type COLLATE collate_name;