Search notes:

Oracle: NLS related init parameters

select * from nls_session_parameters order by parameter;

NLS_CALENDAR              GREGORIAN
NLS_COMP                  BINARY
NLS_CURRENCY              SFr.
NLS_DATE_FORMAT           yyyy-mm-dd hh24:mi:ss
NLS_DATE_LANGUAGE         ENGLISH
NLS_DUAL_CURRENCY         SF
NLS_ISO_CURRENCY          SWITZERLAND
NLS_LANGUAGE              ENGLISH
NLS_LENGTH_SEMANTICS      BYTE
NLS_NCHAR_CONV_EXCP       FALSE
NLS_NUMERIC_CHARACTERS    .'
NLS_SORT                  BINARY
NLS_TERRITORY             SWITZERLAND
NLS_TIMESTAMP_FORMAT      yyyy-mm-dd hh24:mi:ssXff
NLS_TIMESTAMP_TZ_FORMAT   yyyy-mm-dd hh24:mi:ssXff tzr
NLS_TIME_FORMAT           HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT        HH24:MI:SSXFF TZR

NLS_COMP

NLS_COMP can be set to one of
If NLS_COMP is not set in the init parameters, its value shows up as null in V$PARAMETER, V$SYSTEM_PARAMETER, V$PARAMETER2, V$SYSTEM_PARAMETER2 and NLS_INSTANCE_PARAMETERS, but behaves as though it was set to BINARY.

NLS_DATE_FORMAT

Gone here.

NLS_LANG

The value of NLS_LANG sets the language and territory of both, the session running on the Server, and the client.
NLS_LANG has three components, all of which are optional.
language Controls the language of day and month names and error messages, and sorting.
territory Specifies the default format for dates, numbers and monetary values.
character set Specifies the character set with which a user works. Each language has a default character set assosiated with it (which seems to be used when character set is not explicitly specified)
These components are separated between the language and the territory with an underscore and between the territory and character set with a dot (for example FRENCH.CANADA.WE8ISO8859P1)
The value of NLS_LANG should correspond to that of the client's operating system.
TODO: Setting the environment variable NLS_LANG prior to starting SQL*Plus.

NLS_LENGTH_SEMANTICS

The value of NLS_LENGTH_SEMANTICS can be set to BYTE (default value) or CHAR.
For database objects creted in the current session, this value specifies, the default length semantics to use for
While the value of NLS_LENGTH_SEMANTICS affects the use of VARCHAR2 and CHAR, the NCHAR, NVARCHAR2, CLOB and NCLOB are always character-based.
See also VARCHAR2: BYTE vs CHAR.

NLS_NUMERIC_CHARACTERS

The value of nls_numeric_characters consists of two characters:
See also the ORA-01481: invalid number format model error message.

NLS_SORT

The value of NLS_SORT specifies the collating sequence for character value comparison. Thus, this value influences the outcome of
The exact operators and query clauses that obey the NLS_SORT parameter depend on the value of the NLS_COMP parameter. If an operator or clause does not obey the NLS_SORT value, as determined by NLS_COMP, the collation used is BINARY.
Setting the value of nls_sort to binary causes the values to be sorted according to the byte value of the compared value.
If _CI is appended to the value of NLS_SORT, the values are compared case-insensitively (see for example selecting case insensitively in a where clause).
Appending _AI causes the values to be sorted accent-insensitively.
The value of NLS_SORT can also be set using the environment variable NLS_SORT.
The current value of NLS_SORT is returned by sys_context('userenv', 'nls_sort').
The value of NLS_SORT influences the behavior of comparison operations (for example in the where clause) if NLS_COMP is set to linguistics;

NLS_TERRITORY

The value of nls_territory determines the value of the following init parameters if they're not explicitly altered:
The value also influences the day of week (to_char(…, 'D')).

See also

How the value of NLS_SORT and NLS_COMP influences testing of string-equality.
sys_context('userenv', 'nls…')
nls.sql shows session, database and instance NLS-values.
init parameters
The functions get_nls_parameter and set_nls_parameter in dbms_debug_jdwp.
v$nls_valid_values, v$nls_parameters.
Temporarily change an NLS setting in a session
NLS related data dictionary views
Specyfing nls parameter values when using to_char
Globalization (NLS) related SQL functions

Index