重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1787|回复: 0
打印 上一主题 下一主题

[Oracle] rac环境修改数据库字符集

[复制链接]
跳转到指定楼层
楼主
发表于 2022-8-11 15:19:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
实验目标:rac环境修改数据库字符集.
SQL>select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.WE8MSWIN1252
SQL>alter system set cluster_database=false scope=spfile sid='pacs1'; (说明:此参数需修改,否则后面操作会报错)
Systemaltered.
SQL>exit
Disconnectedfrom Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bitProduction
With thePartitioning, Real Application Clusters, Automatic Storage Management, OLAP,
DataMining 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.
Connectedto an idle instance.
SQL>startup nomount;
ORACLEinstance started.
TotalSystem Global Area 2956300288 bytes
FixedSize                  2256912 bytes
VariableSize             687869936 bytes
DatabaseBuffers         2248146944 bytes
RedoBuffers               18026496 bytes
SQL>alter database mount exclusive;
Databasealtered.
SQL>alter system enable restricted session;
Systemaltered.
SQL>alter system set job_queue_processes=0;
Systemaltered.
SQL>alter database open;
Databasealtered.
SQL>alter system enable restricted session;
Systemaltered.
SQL>alter database character set internal_use al32utf8;
Databasealtered.
SQL>alter system set cluster_database=true scope=spfile sid='pacs1';  (说明:此处需将cluster_database修改回true,否则后面启动数据库会报错)
Systemaltered.
SQL>shutdown immediate;
Databaseclosed.
Databasedismounted.
ORACLEinstance shut down.
SQL>exit
Disconnectedfrom Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bitProduction
With thePartitioning, Real Application Clusters, Automatic Storage Management, OLAP,
DataMining 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 rightsreserved.
Connectedto:
OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With thePartitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Miningand Real Application Testing options
SQL>select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
说明:节点2查询后字符集也变为al32utf8.非必要情况不要修改数据库字符集,以免造成其它未知异常.
一次新安装好的数据库,因为字符集未满足要求,经验丰富的DBA都建议删除后重新创建数据库.
rac环境也可用该方法修改数据库字符集,不过cluster_database参数不用做处理.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-25 23:16 , Processed in 0.115120 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表