Oracle 11g R2 RAC数据库中文乱码解决
2012-08-31 11:13
323 查看
1、解决数据库中文乱码:
更改字符集步骤(WE8ISO8859P1 --> ZHS16GBK) :
2、SQLPLUS中文乱码:
更改字符集步骤(WE8ISO8859P1 --> ZHS16GBK) :
[oracle@rac121 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on 星期五 8月 31 10:56:55 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate --这儿是RAC,所以需要关闭所有节点 Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1.3462E+10 bytes Fixed Size 2241104 bytes Variable Size 7281315248 bytes Database Buffers 6174015488 bytes Redo Buffers 4485120 bytes Database mounted. SQL> alter system enable restricted session; System altered. SQL> show parameter job_queue NAME TYPE VALUE ----------------------- ----------- ---------- job_queue_processes integer 1000 SQL> show parameter aq_tm NAME TYPE VALUE ----------------------- ----------- ---------- aq_tm_processes integer 10 SQL> alter system set job_queue_processes=0; System altered. SQL> alter system set aq_tm_processes=0; System altered. SQL> alter database open; Database altered. SQL> Alter DATABASE character set INTERNAL_USE ZHS16GBK; Alter DATABASE character set INTERNAL_USE ZHS16GBK * ERROR at line 1: ORA-12720: 操作要求数据库处于 EXCLUSIVE 模式下 --由于是RAC环境,所以要修改参数cluster_database SQL> alter system set cluster_database=false scope=spfile; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1.3462E+10 bytes Fixed Size 2241104 bytes Variable Size 7281315248 bytes Database Buffers 6174015488 bytes Redo Buffers 4485120 bytes Database mounted. SQL> alter system enable restricted session; System altered. SQL> alter database open; Database altered. SQL> Alter DATABASE character set INTERNAL_USE ZHS16GBK; Database altered. SQL> select userenv('language') from dual; USERENV('LANGUAGE') ---------------------------------------------------- SIMPLIFIED CHINESE_CHINA.ZHS16GBK SQL> alter system set job_queue_processes=1000; System altered. SQL> alter system set aq_tm_processes=10; System altered. SQL> alter system set cluster_database=true scope=spfile; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 1.3462E+10 bytes Fixed Size 2241104 bytes Variable Size 7281315248 bytes Database Buffers 6174015488 bytes Redo Buffers 4485120 bytes Database mounted. Database opened. SQL> show parameter cluster_database NAME TYPE VALUE ----------------- ------------- ------------------ cluster_database boolean TRUE cluster_database_instances integer 2 SQL> --到此可以向数据库中插入中文
2、SQLPLUS中文乱码:
[oracle@rac122 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Fri Aug 31 11:20:21 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select * from terry.t2; VNAME -------------------- ?? ????? SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@rac122 ~]$ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" [oracle@rac122 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on 星期五 8月 31 11:20:55 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select * from terry.t2; VNAME -------------------- 呵呵 一二三国四 SQL>
相关文章推荐
- 解决在Linux6.1下安装Oracle-11g-R2时的中文乱码问题-(图形安装过程中)
- Oracle 11g r2 x64 中文乱码解决方案
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- 安装Oracle 11g R2后,EM登陆界面显示乱码解决方法
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- oracle 11g 数据库中文字段,vs2013 MFC工程 显示乱码解决办法
- win7 64位系统 Oracle32bit + PL/SQL访问Orale服务,Oracle 11g的安装,中文乱码问题的解决
- oracle 10g EM中文乱码解决办法
- oracle 10g中em按键中文乱码解决方法
- oracle 中文乱码解决办法
- pl/sql developer中文乱码,为什么呢?怎么解决?Oracle问题
- Centos7 安装Oracle 11g R2完整手册及问题解决方法
- 【Oracle 11G r2单数据库多实例单监听问题解决】
- Oracle:sqlplus查询出的中文是乱码问题的解决
- 解决oracle 中文入库是乱码的问题
- ORACLE中文显示乱码解决
- oracle 10g EM中文乱码解决办法