nav-img
Advanced

Changing a Character Set

RDS for SQL Server supports character sets. Character sets provide sorting rules, case, and accent sensitivity properties for your data. You can configure the character set when creating a DB instance or change the character set later as needed.

When you select a sorting rule for your server, database, column, or expression, you are assigning certain characteristics to your data. These characteristics affect the results of many operations in the database. For example, when you construct a query by using ORDER BY, the sort order of your result set might depend on the sorting rule that is applied to the database.

Constraints

  • The character set of a DB instance can be changed only when the instance does not contain any non-system databases.
  • Changing the character set will cause the instance to reboot.
  • It takes 10 to 15 minutes to change a character set.

Changing a Character Set

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click Service List. Under Database, click Relational Database Service.
  4. On the Instances page, click the instance name.
  5. Click Change next to the Character Set field.
  6. In the displayed dialog box, select a character set and click Yes.
  7. View the result on the Basic Information page.

Character Set Sorting Rules

Table 1 Sorting rule options

Option

Description

Case-sensitive (_CS)

Distinguishes between uppercase and lowercase letters.

  • If this option is selected, lowercase letters sort ahead of their uppercase versions.
  • If this option is not selected, the sorting rule is case-insensitive. RDS for SQL Server considers the uppercase and lowercase versions of letters to be identical for sorting purposes.
  • You can explicitly select case insensitivity by specifying _CI.

Accent-sensitive (_AS)

Distinguishes between accented and unaccented characters.

For example, "a" is not equal to "ấ".

  • If this option is not selected, the sorting rule is accent-insensitive. That is, RDS for SQL Server considers the accented and unaccented versions of letters to be identical for sorting purposes.
  • You can explicitly select accent insensitivity by specifying _AI.

Character Set Suffixes

Table 2 Character set suffixes

Suffix

Description

_CI_AI

Case-insensitive and accent-insensitive

_CI_AS

Case-insensitive and accent-sensitive

_CS_AI

Case-sensitive and accent-insensitive

_CS_AS

Case-sensitive and accent-sensitive