There are three components of the
NLS_LANG
parameter:
- Language determines the language used by Oracle for error messages, day names, and month names.
- Territory determines the local conventions, such as date formats and currency symbols.
- Charset indicates the actual character set used by the client.
The
language and
territory portions of the parameter are optional. If a language or territory is not specified, these portions default to American.
However, if you have a
language setting, you must also have a
territory setting and separate the two with an underscore. The
territory value is separated from the
charset value by a period.
You set the
NLS_LANG
parameter as an environment variable for your particular operating system. If you do not specify a value for the
NLS_LANG
parameter, Oracle will use the default value for
language and territory
for the database you are using, which are specified in the initialization file for that database with the parameters
NLS_LANGUAGE
and NLS_TERRITORY, respectively.
You can change the value for the
NLS_LANGUAGE
or the
NLS_TERRITORY
parameters at any time in a session with the
ALTER SESSION
command.
You have learned some of the important national language parameters, but
additional parameters are worth mentioning.
In the next lesson, you will learn about character sets, which determine how data is stored and interpreted in the Oracle database.