NLS_LANG = language_territory.charset
Each component controls the operation of a subset of NLS features.
language | Specifies conventions such as the language used for Oracle messages, day names, and month names. Each supported language has a unique name; for example, American, French, or German. The language argument specifies default values for the territory and character set arguments, so either (or both) territory or charset can be omitted. For a complete list of languages, see "Supported Languages" . |
territory | Specifies conventions such as the default date format and decimal character used for numbers. Each supported territory has a unique name; for example, America, France, or Canada. For a complete list of territories, see "Supported Territories" . |
charset | Specifies the character set used by the client application (normally that of the user's terminal). Each supported character set has a unique acronym, for example, US7ASCII, WEISO8859P1, WE8DEC, WE8EBCDIC500, or JA16EUC. Each language has a default character set associated with it. Default values for the languages available on your system are listed in your installation or user's guide. For a complete list of character sets, see "Storage Character Sets" and "Arabic/Hebrew Display Character Sets" . |
The three arguments of NLS_LANG can be specified in any combination, as in the following examples:
NLS_LANG = AMERICAN_AMERICA.US7ASCII
or
NLS_LANG = FRENCH_FRANCE.ISO8859P1
or
NLS_LANG = FRENCH_CANADA.WE8DEC
or
NLS_LANG = JAPANESE_JAPAN.JA16EUC
For example, on VMS you could specify the value of NLS_LANG by entering the following line at the VMS prompt:
$ DEFINE NLS_LANG FRENCH_FRANCE.WE8DEC
If you do not specify a value for NLS_LANG, the language_dependent behavior defaults to the language specified by the NLS_LANGUAGE database initialization parameter, the territory specified by the NLS-TERRITORY database initialization parameter, and the character set with which the database was created.
For more information on how to set NLS_LANG on your system, see your operating system-specific Oracle documentation.
Because NLS_LANG is an environment variable, it is read by the client application at startup time. The client communicates the information defined in NLS_LANG to the server when it connects.
ALTER SESSION SET NLS_LANGUAGE = FRENCH NLS_TERRITORY = FRANCE
This feature implicitly determines the language environment of the database for each session. An ALTER SESSION statement is automatically executed when a session connects to a database to set the values of the database parameters NLS_LANGUAGE and NLS_TERRITORY to those specified by the language and territory arguments of NLS_LANG. If NLS_LANG is not defined, no ALTER SESSION statement is executed.
When NLS_LANG is defined, the implicit ALTER SESSION is executed for all instances to which the session connects, for both direct and indirect connections. If the values of NLS parameters are changed explicitly with ALTER SESSION during a session, the changes are propagated to all instances to which that user session is connected.