Settings for Oracle client Nls_lang (RPM)

Source: Internet
Author: User

1. Nls_lang parameter composition
The Nls_lang parameter consists of the following parts:
Nls_lang=<language>_<territory>.<clients characterset>

Nls_lang the meanings of each part are as follows:
LANGUAGE specifies:
-oracle the language used for messages
-Date month and day display
Territory Specify
-Currency and number formats
-area and calculation of week and date habits
CHARACTERSET:
-Control the character set used by the client application
Typically set or equal to a client (such as Windows) code page
Or for a Unicode app set to UTF8

To view the code page for the current system on Windows, you can use the CHCP command:
E:/>chcp
Active code page: 936

Code page 936 is the Chinese character set GBK, at Microsoft's official site, we can be about 936 code page specific coding rules, please refer to the following links:
Http://www.microsoft.com/globaldev/reference/dbcs/936.htm


2. How to view Nls_lang
Windows uses:

Echo%nls_lang%
Such as:
E:/>echo%nls_lang%
American_america. Zhs16gbk

UNIX Uses:

Env|grep Nls_lang
Such as:
/opt/oracle>env|grep Nls_lang
Nls_lang=american_china. Zhs16gbk

Windows client settings, you can change the Nls_lang in the registry, the specific key value is located in:
hkey_local_machine/software/oracle/homexx/
XX refers to the system number when there are multiple oracle_home.


3. View database current character Set parameter settings
SELECT * from V$nls_parameters;


4. View database available character Set parameter settings
SELECT * from V$nls_valid_values;


5. How to set up client Nls_lang
Windows:
# Common Chinese Character set
Set Nls_lang=simplified Chinese_china. Zhs16gbk
# Common Unicode character sets
Set Nls_lang=american_america. Al32utf8
Can be permanently set by modifying registry key values
Hkey_local_machine/software/oracle/homexx/nls_lang

Unix:
# Common Unicode character sets
Export Nls_lang=american_america. Al32utf8
# Common Chinese Character set
Export nls_lang= "Simplified Chinese_china". Zhs16gbk
You can edit the Bash_profile file for permanent setup
VI. bash_profile
nls_lang= "Simplified Chinese_china". ZHS16GBK Export Nls_lang
# Make Bash_profile settings effective
source. bash_profile

http://blog.csdn.net/wzy0623/article/details/1683337

Settings for Oracle client Nls_lang (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.