Accessing and Changing Relational Data

Collations in Distributed Queries

In Microsoft® SQL Server™ version 7.0, the local SQL Server always had only one server-wide collation (code page and sort order). All character data from remote data sources were interpreted using the local server-wide collation. However, Microsoft SQL Server 2000 supports multiple collations, which can be different for each column; each character value has an associated collation property. SQL Server 2000 interprets the collation property of character data from a remote data source and treats it accordingly.

SQL Server 2000 uses the collation of remote data for comparison and ordering operations on character data (both Unicode and non-Unicode). The collation information for remote character data is determined differently depending on whether or not the data source corresponds to a SQL Server:

After SQL Server determines the collation of a remote character column, it follows the same rules for converting, comparing, and operating on remote table columns as it does for local columns. For more information about the rules SQL Server applies to collations and the collation names supported by SQL Server, see SQL Server Collation Fundamentals.

The linked server options defined by using sp_serveroption control if and how SQL Server uses collations from linked servers:

The following table summarizes how SQL Server determines the collation used for each column.

  Use Remote Collation = ON Use Remote Collation = OFF

Linked server type
Collation name
Not set
Collation name
Set (to CollX)
Collation name
Not set
Collation name
Set (to CollX)
SQL Server Remote column's actual collation Remote column's actual collation Default collation of local SQL Server instance Collation of local SQL Server instance
Others Default collation of local SQL Server instance CollX Default collation of local SQL Server instance Default collation of local SQL Server instance