RAC环境下修改字符集

数据库 waitig 555℃ 百度已收录 0评论

操作系统 Redhat Linux 6.7

ORACLE 11g RAC 2节点

第一步 查看字符集

SQL>select userenv(‘language’) from dual;

USERENV(‘LANGUAGE’)
——————————————————————————–
AMERICAN_AMERICA.AL32UTF8

第二步 关闭一个节点

[root@rac1 ~]#cd /u01/app/11.2.0/grid/bin/crsctl
[root@rac1 ~]#./crsctl stop cluster

第三步 在另一个节点修改启动参数,关闭RAC

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;

第七步 启动开始停止的RAC节点,并验证

[root@rac1 ~]#./crsctl start cluster
查看字符集:
SQL>select userenv(‘language’) from dual;
USERENV(‘LANGUAGE’)
——————————————————————————–
AMERICAN_AMERICA.ZHS16GBK

PS:

修改完后,要恢复一些参数

SQL>startup mount;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
System altered.
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=1;
System altered.
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=1;
System altered.
SQL> alter database open;
Database altered.


本文由【waitig】发表在等英博客
本文固定链接:RAC环境下修改字符集
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)