[Oracle Notes] Oracle's solution to Chinese garbled characters due to absence of character sets during installation

Source: Internet
Author: User

No character set is set when Oracle11g is installed on Centos6.5. The default Operating System character set is used: WE8MSWIN1252 and ZHS16GBK is used.

[Oracle @ xserver ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.1.0 Production on Sat Dec 28 12:17:01 2013

Copyright (c) 1982,200 9, Oracle. All rights reserved.


Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from nls_database_parameters where parameter = 'nls _ CHARACTERSET ';

PARAMETER
------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
WE8MSWIN1252

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1056966768 bytes
Database Buffers 536870912 bytes
Redo Buffers 7360512 bytes
Database mounted.
SQL> alter system enable restricted session;

System altered.

SQL> show parameter job_queue_processes;

NAME TYPE VALUE
-----------------------------------------------------------------------------
Job_queue_processes integer1000
SQL> alter system set job_queue_processes = 0;

System altered.

SQL> alter database open;

Database altered.

SQL> alter database character set ZHS16GBK;
Alter database character set ZHS16GBK
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set

SQL> alter database character set internal_use ZHS16GBK;

Database altered.

SQL> select * from nls_database_parameters where parameter = 'nls _ CHARACTERSET ';

PARAMETER
------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
ZHS16GBK

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1056966768 bytes
Database Buffers 536870912 bytes
Redo Buffers 7360512 bytes
Database mounted.
SQL & gt; alter system set job_queue_processes = 1000;

System altered.

SQL> alter database open;

Database altered.

SQL>

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.