重庆思庄oracle技术分享-rac环境修改数据库字符集

实验目标: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参数不用做处理.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值