Legacy platform

Configuring the NLS_LANG parameter for an Oracle client

About this task

To ensure the compatibility of character sets between the Oracle client and the server, the value of the NLS_LANG parameter that is set in the client must match the value in the server.

The entire set of NLS settings pertaining to the database is provided in the NLS_DATABASE_PARAMETERS table.

Procedure

  1. Run the following queries to get the corresponding values:
    • SELECT VALUE as Language FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER='NLS_LANGUAGE';
    • SELECT VALUE as Territory FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER='NLS_TERRITORY';
    • SELECT VALUE as Characterset FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER='NLS_CHARACTERSET';

      The NLS_LANG parameter is set as: <Language>_<Territory>.<Characterset> (for example, set NLS_LANG = AMERICAN_AMERICA.UTF8)

  2. To set the value of the NLS_LANG parameter in Windows, verify the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/NLS_LANG entry in the registry.
  3. To set the value of the NLS_LANG parameter in UNIX, NLS_LANG is set as a local environment variable.