这篇文章将为大家详细讲解有关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
在另一个节点查看oracle启动参数:
SQL>show parameter spfile;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
spfile string +DG1/yoon/spfileyoon.ora
若VALUE为空,表示用pfile参数启动,即修改为spfile参数启动:
SQL>CREATE SPFILE FROM PFILE;
SQL>shutdown immediate;
SQL>startup;
执行:
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;
启动另一节点cluster服务并验证:
[root@rac1 ~]#./crsctl start cluster
查看字符集:
SQL>select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
关于“oracle 11g rac如何修改字符集”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。