How to find / Set NLS_LANG in Solaris AIX Unix and Windows for Oracle?

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
What is NLS_LANG Parameter?
It is an environment parameter to specify the local behavior for the oracle software. The formatting of the date, number, time and currency parameter are changes depending on the regions, country. This parameter sets the language and territory used by the application and the oracle database server. NLS_LANG is a local environment variable for the UNIX platforms like Solaris, AIX and Linux. For windows it has to be set in registry or it can be set locally also.


Format of NLS_LANG=<language>_<territory>.<character set> where each part of this parameter controls the operation of a globalization support features.

  1. Language: It determines the languages used for Oracle messages, day, and month names. For each language there are unique names like AMERICAN, FRENCH, JAPANEESE etc. By default value is AMERICAN
  2. Territory: it determines the conventions for default date, monetary and numeric formats. As like language each territory has its own names which is derived from the corresponding languages. Example: AMERICA, FRANCE, JAPAN
  3. Character Set: It specifies the character set used by the client application and it is correlated with the user terminal character set or Operating system character set.
It is important that you have to specify underscore (‘_’) for territory and dot (‘.’) for character set as the preceding character. Otherwise entire string will be considered as the language name.

Below motioned query will give you the valid and oracle recognizable NLS parameter values.
select * from V$NLS_VALID_VALUES;

How to set and see the NLS_LANG in windows?
  1. Session level setting from command prompt
C:\Users>set NLS_LANG=AMERICAN_AMERICA.AL32UTF8

C:\Users>set NLS_LANG
NLS_LANG=AMERICAN_AMERICA.AL32UTF8

C:\Users>echo %NLS_LANG%
AMERICAN_AMERICA.AL32UTF8
  1. Set the variables permanently
Go to Desktop -> My Computer -> Properties -> Advanced System Settings -> Environment variables
  1. Change the NLS_LANG Parameter value in registry
For 10g 11g: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<oracle_home_name>

How to set and see the NLS_LANG in Unix Solaris AIX Linux?
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
To see the current values
$ env|grep NLS
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
$ echo $NLS_LANG
AMERICAN_AMERICA.AL32UTF8

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer