Oracle Nls_lang Settings ____oracle

Source: Internet
Author: User
1. Nls_lang parameter composition
The Nls_lang parameter consists of the following sections:
Nls_lang=<language>_<territory>.<clients characterset>

The meaning of each part of the Nls_lang is as follows:
Language specify:
Language used by-oracle messages
-month and day display in date
Territory specified
-Currency and number formats
-area and the habit of calculating week and date
CHARACTERSET:
-Control the character set used by the client application
Typically set or equal to the client (such as Windows) code page
or set to UTF8 for Unicode applications

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, which is the Chinese character set GBK, at Microsoft's official site, we can get specific coding rules about the 936 code page, please refer to the following links:
Http://www.microsoft.com/globaldev/reference/dbcs/936.htm


2. How to view Nls_lang
Windows use:

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 Nls_lang in the registry, where the specific key value is:
Hkey_local_machine\software\oracle\homexx\
XX refers to the system number when multiple oracle_home are present.


3. View the database's 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. Method of setting 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 settings
VI. bash_profile
nls_lang= "Simplified Chinese_china". ZHS16GBK Export Nls_lang
# Make Bash_profile settings take effect
source. bash_profile

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.