Collations#

A collation defines how character data is sorted and compared and, for non-Unicode types, which code page encodes it. Querona applies a single, server-level collation to the character data it returns, and provides the SQL Server functions for inspecting collations.

The server collation#

Querona returns every char, varchar and text column using one server collation, set by the engine option TDS char collation for returned character types (default SQL_Latin1_General_CP1_CI_AS). That collation’s code page determines how these non-Unicode strings are encoded on the TDS wire.

The setting affects only what Querona returns to clients. It does not change the collations of your source systems, and it does not alter stored provider data.

Note

The legacy text and ntext types don’t carry UTF-8 or supplementary-character (SC) collation variants — text is always encoded in the collation’s single-byte code page and ntext is always UTF-16 — as in SQL Server, where these deprecated types don’t support those collations. The modern varchar / nvarchar types are unaffected.

To view or change the server collation, see Engine settings.

Unicode and non-Unicode types#

Collation only affects non-Unicode character data:

  • char, varchar and text are non-Unicode and are encoded in the server collation’s code page.

  • nchar, nvarchar and ntext are Unicode (UCS-2); their bytes are the same regardless of the configured collation.

For the character data types, see Character strings and Unicode character strings.

Inspecting collations#

Querona supports the SQL Server functions for listing and inspecting collations:

Function

Returns

fn_helpcollations

The list of available collations and their descriptions.

SERVERPROPERTY

The server collation name, via the 'Collation' property.

COLLATIONPROPERTY

A property of a named collation.

COLLATIONPROPERTYFROMID

A collation property, looked up by collation id.

COLLATIONNAME

The collation name for a given collation id.

See also#