Client Character Set

Source: Internet
Author: User

This section is part of Oracle's global support for more information about the documentation available
First talk about the database character set, when we build the library with DBCA, we will let you choose the database character set, the default is based on the operating system language settings:
[Email protected] ~]$ echo $LANG;
Zh_cn. UTF-8

Sql> Select Userenv (' language ') from dual
2;
USERENV (' LANGUAGE ')
----------------------------------------------------
Simplified Chinese_china. Al32utf8
The database character set can also be seen from the alert logs initiated by Oracle:
Database Characterset is Al32utf8
from the Viewnls_database_parameterscan also be seen
Of course we can modify the database character set (but there are limitations.) Modification not recommended):
You can modify the database character set only if the new character set is a superset of the current character set , for example UTF8is aUs7ascii, modify the database character set to useALTER DATABASE CHARACTER SET UTF8

Client Character Set Environment
SELECT * FROM Nls_instance_parameters
It originates from V$parameter, which represents the setting of the client's character set, which may be a parameter file, an environment variable, or a registry

Session Character Set Environment
SELECT * FROM Nls_session_parameters
From V$nls_parameters, which indicates the session's own settings, perhaps the environment variable of the session or the ALTER session is completed, the character set of the session is only valid in this session, and after the session ends, it becomes invalid. If the session does not have a special setting, it will be consistent with nls_instance_parameters.

The client's character set requires consistency with the server to correctly display non-ASCII characters for the database. If multiple settings are present, NLS action priority: Character settingfunction> Alter SESSION > Environment variable or Registry > parameter file > database default Parameters 
Character set requirements are consistent, but language settings can be different, language settings are recommended in English. If the character set is ZHS16GBK, then Nls_lang can be AMERICAN_AMERICA.ZHS16GBK.

The following focuses on the client character set settings:
Under Linux:
[Email protected] ~]$ export LANG=ZH_CN. UTF-8
Windows environment:
Registration form:
Regedit =>hkey_local_machine =>software =>oracle-home
Nls_lang:simplified Chinese_china. Zhs16gbk
Nls_lang can be divided into three parts:
Language: Language Simplified Chinese
Territory: Area  China
Character Set: Character setZHS16GBK

Nls_lang=<language>_<territory>.<client character set>
The impact of each parameter:
Language: Display Oracle message, checksum, date name
Territory: Specify default date, number, currency, and other formats
Client Character Set: Specifies the character set that clients will use
SELECT * from v$nls_valid_values this view is useful, you can find Oracle support all the above three parameters


               

Client Character Set

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.