How to change the oracle xe character set to ZHS16GBK, xezhs16gbk

Source: Internet
Author: User

How to change the oracle xe character set to ZHS16GBK, xezhs16gbk

After Oracle XE runs the installation program, the simple default value is SIMPLIFIED CHINESE_CHINA.AL32UTF8. You can change it to ZHS16GBK using the following method.

The character set of the client must be the same as that of the server to correctly display non-Ascii characters of the database. The character set settings of the client exist in multiple places: session> environment variable> registry> parameter file

The character set must be consistent, but the language settings can be different. We recommend that you use English for language settings. If the character set is zhs16gbk, The nls_lang can be American.

View database character sets

/* Server Character Set */select * from nls_database_parameters; -- it comes from props $/* client Environment Character Set */select * from nls_instance_parameters; -- It comes from v $ parameter/* session Environment Character Set */select * from nls_session_parameters; -- it comes from v $ nls_parameters

Set server Character Set

/* 1 log on to sys user */SQL> connect sys/manager as sysdba;/* 2 shut down the database */SQL> shutdown immediate; the database has been closed. The database has been detached. The ORACLE routine has been disabled. /* 3 database load */SQL> startup mount; the ORACLE routine has been started. Total System Global Area 1068937216 bytesFixed Size 2260048 bytesVariable Size 788530096 bytesDatabase Buffers 272629760 bytesRedo Buffers 5517312 bytes database loaded. /* 4. Modify the data Character Set */SQL> alter system enable restricted session; the system has changed. SQL> alter system set JOB_QUEUE_PROCESSES = 0; the system has changed. SQL> alter system set AQ_TM_PROCESSES = 0; the system has changed. SQL> alter database open; the database has been changed. SQL> alter database character set internal_use ZHS16GBK; the database has been changed. /* 5. Restart the database */SQL> shutdown immediate; the database has been closed. The database has been detached. The ORACLE routine has been disabled. SQL> startup; the ORACLE routine has been started. Total System Global Area 1068937216 bytesFixed Size 2260048 bytesVariable Size 788530096 bytesDatabase Buffers 272629760 bytesRedo Buffers 5517312 bytes database loaded. The database has been opened.

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