DB_LOCALE environment variable

The DB_LOCALE environment variable specifies the database locale, which the database server uses to process locale-sensitive data.

See The database locale and Manage GLS files.
DB_LOCALElanguage_territory .code_set [@modifier]
Element
Description
code_set
Name of the code set that the locale supports.
language
Two-character name that represents the language for a specific locale.
modifier
Optional locale modifier that has a maximum of four alphanumeric characters.
territory
Two-character name that represents the cultural conventions.

The modifier specification modifies the cultural-convention settings that the language and territory settings imply. The modifier can indicate a localized collating order that the locale supports. For example, you can set @modifier to specify dictionary or telephone-book collation order.

An example nondefault database locale follows:
DB_LOCALE zh_cn.utf8

The glfiles utility can generate a list of the GLS locales available on your UNIX system. For more information, see The glfiles utility (UNIX).

The SET COLLATION statement can specify for the current session a localized collation different from the COLLATION setting of the DB_LOCALE locale. This can affect sorting operations on NCHAR and NVARCHAR data values.

If you do not set DB_LOCALE on the client computer, client applications assume that the database locale has the value of the CLIENT_LOCALE environment variable. The client application, however, does not send this default value to the database server when it requests a connection.

Changes to DB_LOCALE also enter in the Windows registry database under HKEY_LOCAL_MACHINE.