rac环境修改数据库字符集
实验目标:rac环境修改数据库字符集.
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.WE8MSWIN1252
SQL> alter system set cluster_database=false scope=spfile sid='pacs1'; (说明:此参数需修改,否则后面操作会报错)
System altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@hisdb1 ~]$ srvctl stop database -d pacs
启动数据库(节点1执行)
[oracle@hisdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Aug 7 10:55:25 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 2956300288 bytes
Fixed Size 2256912 bytes
Variable Size 687869936 bytes
Database Buffers 2248146944 bytes
Redo Buffers 18026496 bytes
SQL> alter database mount exclusive;
Database altered.
SQL> alter system enable restricted session;
System altered.
SQL> alter system set job_queue_processes=0;
System altered.
SQL> alter database open;
Database altered.
SQL> alter system enable restricted session;
System altered.
SQL> alter database character set internal_use al32utf8;
Database altered.
SQL> alter system set cluster_database=true scope=spfile sid='pacs1'; (说明:此处需将cluster_database修改回true,否则后面启动数据库会报错)
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@hisdb1 ~]$ srvctl start database -d pacs
[oracle@hisdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Aug 7 11:00:14 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
说明:节点2查询后字符集也变为al32utf8.非必要情况不要修改数据库字符集,以免造成其它未知异常.
一次新安装好的数据库,因为字符集未满足要求,经验丰富的DBA都建议删除后重新创建数据库.
非rac环境也可用该方法修改数据库字符集,不过cluster_database参数不用做处理.
参考网址:
https://www.dandelioncloud.cn/article/details/1535996852050968578
http://www.cppblog.com/ivenher/articles/13151.html
版权声明
本文仅代表作者观点,不代表博信信息网立场。
上一篇:怎样修改oracle的连接数 下一篇:oracle怎样修改sga