oracle 11g rac 修改字符集

前端之家收集整理的这篇文章主要介绍了oracle 11g rac 修改字符集前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

系统版本:
Oracle Linux Server release 5.7
数据库版本:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/sql Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
查看字符集:
sql>select userenv('language') from dual;
USERENV('LANGUAGE')

AMERICAN_AMERICA.AL32UTF8
关闭RAC其中一个节点:
[root@rac1 ~]#cd /u01/app/11.2.0/grid/bin/crsctl
[root@rac1 ~]#./crsctl stop cluster
在另一个节点执行:
sql>alter system set cluster_database=false scope=spfile;
关闭数据库
sql>shutdown immediate;
sql>startup mount;
sql> ALTER SYSTEM ENABLE RESTRICTED SESSION;
System altered.
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;
Database altered.
恢复数据库为RAC:
sql> alter system set cluster_database=true scope=spfile;
sql> shutdown immediate;
sql>startup;
sql> execute sys.dbms_Metadata_util.load_stylesheets;
启动另一节点cluster服务并验证:
[root@rac1 ~]#./crsctl start cluster
查看字符集:
sql>select userenv('language') from dual;
USERENV('LANGUAGE')

AMERICAN_AMERICA.ZHS16GBK

参考博文:http://blog.itpub.net/28939273/viewspace-1061440/

猜你在找的Oracle相关文章