【Oracle笔记】Oracle因安装时未设定字符集导致中文乱码的解决方案
2013-12-28 12:28
531 查看
在Centos6.5上安装Oracle11g没有设定字符集,采用的是操作系统默认字符集:WE8MSWIN1252,将字符集修改为:ZHS16GBK。
[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, 2009, Oracle. All rights reserved.
Connected to:
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> alter system set job_queue_processes=1000;
System altered.
SQL> alter database open;
Database altered.
SQL>
[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, 2009, Oracle. All rights reserved.
Connected to:
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> alter system set job_queue_processes=1000;
System altered.
SQL> alter database open;
Database altered.
SQL>
相关文章推荐
- 【Oracle笔记】Oracle因安装时未设定字符集导致中文乱码的解决方案
- [转]Oracle因安装时未设定字符集导致中文乱码的解决方案
- Oracle因安装时未设定字符集导致中文乱码的解决方案
- 解决Oracle因安装时未设定字符集导致中文乱码问题
- jdbc操作非中文字符集oracle数据库导致的中文字符读写乱码的解决方案
- 网站开发笔记:PHP oci连接Oracle中文乱码问题解决方案
- 中文linux安装oracle界面乱码解决方案
- 中文linux安装oracle界面乱码解决方案
- 中文linux安装oracle界面乱码解决方案
- 中文linux安装oracle界面乱码解决方案
- 免安装的oracle——plusql 字符集 是中文乱码的配置
- Oracle 数据库字符集与客户端字符集不一致,导致中文数据显示乱码
- 中文linux安装oracle界面乱码解决方案
- ubuntu下安装oracle sql developer及中文乱码解决
- RHEL5.1安装VM TOOL及中文乱码终极解决方案
- oracle11 客户端安装及PLSQL和TOAD中文乱码
- oracle 中文乱码---查看和修改客户端字符集
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- Oracle 11g r2 x64 中文乱码解决方案
- RHEL5安装VM TOOL及中文乱码终极解决方案