View the encoding of Oracle databases and how to modify the encoding format _oracle

Source: Internet
Author: User

First look at the Oracle database encoding

Sql> SELECT * from nls_database_parameters where parameter = ' nls_characterset ';


This is derived from props$, which represents the character set of the database.

Oracle Client Encoding

Sql> SELECT * from nls_instance_parameters where parameter= ' nls_language ';

Simplified Chinese

It comes from V$parameter, which represents the setting of the client's character set, possibly a parameter file, an environment variable, or a registry session character set environment

The select * from Nls_session_parameters, which originates from the V$nls_parameters, represents the session's own settings, may be the session's environment variable or the ALTER session is complete, and if there are no special settings, it will be associated with the NLS _instance_parameters consistent.

Again, how do I modify Oracle's character set:

At present my database environment's character set is Al32utf8, then change it to ZHS16GBK

1. First sign up as SYSDBA conn/as SYSDBA

2. Close the database shutdown immediate;

3. With mount to call the database, startup mount

4. Set session

Sql>alter SYSTEM ENABLE restricted session;
sql> ALTER SYSTEM SET job_queue_processes=0;
sql> ALTER SYSTEM SET aq_tm_processes=0;

5. Start the database


6. Modify Character Set


This may be an error indicating our character set: The new character set must be a superset of the old character set, at which point we can skip the check of the superset to make changes:

ALTER DATABASE Character Set Internal_use ZHS16GBK;

This statement is OK, and the Help that Ternal_use provides allows Oracle to bypass the validation of subsets and superset, which is identical to the internal operation of the statement above.

7. Shutdown, reboot

Sql>shutdown immediate;
Sql> Startup

Of course, the character set is best not easily modified, because this will have a direct impact on the data of the database, if the production environment, it may cause incalculable loss.

Related Article

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: 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.