ITPub博客

首页 > 数据库 > Oracle > ZHS16GBK转换成AL32UTF8

ZHS16GBK转换成AL32UTF8

原创 Oracle 作者:hellohf123 时间:2022-02-21 10:55:59 0 删除 编辑

现字符集

SQL>  select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK



rac环境转换字符集

关闭数据库
[root@rac2 ~]# srvctl stop database -db hap
转换
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 4999609048 bytes
Fixed Size                  9145048 bytes
Variable Size             956301312 bytes
Database Buffers         4026531840 bytes
Redo Buffers                7630848 bytes
SQL> alter system set cluster_database=FALSE scope=spfile sid='*';
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 4999609048 bytes
Fixed Size                  9145048 bytes
Variable Size             956301312 bytes
Database Buffers         4026531840 bytes
Redo Buffers                7630848 bytes
Database mounted.
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 AL32UTF8;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
启动并检查
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 4999609048 bytes
Fixed Size                  9145048 bytes
Variable Size             956301312 bytes
Database Buffers         4026531840 bytes
Redo Buffers                7630848 bytes
SQL> alter system set cluster_database=TRUE scope=spfile sid='*';
System altered.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 4999609048 bytes
Fixed Size                  9145048 bytes
Variable Size             956301312 bytes
Database Buffers         4026531840 bytes
Redo Buffers                7630848 bytes
Database mounted.
Database opened.
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
SQL>


这样rac的字符集就从ZHS16GBK转换成AL32UTF8。




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70004783/viewspace-2856605/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 19c RAC 双实例
下一篇: oracle 19c EM
请登录后发表评论 登录
全部评论

注册时间:2021-08-05

  • 博文量
    78
  • 访问量
    81356