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.
Read syntax diagramSkip visual syntax diagram

Name of the code set that the locale supports.
Two-character name that represents the language for a specific locale.
Optional locale modifier that has a maximum of four alphanumeric characters.
Two-character name that represents the cultural conventions. For example, territory might specify the Swiss version of the French, German, or Italian language.

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 for a French-Canadian locale follows:
DB_LOCALE fr_ca.8859-1

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.

Copyright© 2018 HCL Technologies Limited