千家信息网

CentOS Data Guard数据库更改字符集备库是否需要单独操作

发表于:2025-02-22 作者:千家信息网编辑
千家信息网最后更新 2025年02月22日,CentOS Data Guard数据库更改字符集备库是否需要单独操作,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。CentOS D
千家信息网最后更新 2025年02月22日CentOS Data Guard数据库更改字符集备库是否需要单独操作

CentOS Data Guard数据库更改字符集备库是否需要单独操作,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

CentOS Data Guard环境下修改数据库字符集 环境.

VMWARE  OS:CentOS 5.3  Primary:Oracle 10.2.0.1.0  Standby:Oracle 10.2.0.1.0

CentOS Data Guard下面的操作均在Primary上,不会影响到Standby DB,备库需要单独操作。数据库更改字符集:源字符集CentOS Data Guard目标字符集WE8ISO8859P1 --> AL32UTF8AL16UTF16 --> AL16UTF16

<方法一>:由于目标CentOS Data Guard字符集不是源字符集的超集,所以导致失败

Startup nomount;  Alter database mount exclusive;  Alter system enable restricted session;  Alter system set job_queue_processes=0;**  Alter database open;  Alter database character set AL32UTF8;


在***一步报错,内容为目标字符集不是源字符集的超集过程:

SQL> shutdown immediate;  Database closed.  Database dismounted.  ORACLE instance shut down.  SQL> startup nomount;  ORA-32004: obsolete and/or deprecated parameter(s) specified  ORACLE instance started.
Total System Global Area  272629760 bytes  Fixed Size                  1218920 bytes  Variable Size              92276376 bytes  Database Buffers          176160768 bytes  Redo Buffers                2973696 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 database character set AL32UTF8;  Alter database character set AL32UTF8  ERROR at line 1:  ORA-12712: new character set must be a superset of old character set
SQL> host  [oracle@Primary ~]$ oerr ora 12712  12712, 00000, "new character set must be a superset of old character set"  // *Cause: When you ALTER DATABASE ... CHARACTER SET, the new  //         character set must be a superset of the old character set.  //         For example, WE8ISO8859P1 is not a superset of the WE8DEC.  // *Action: Specify a superset character set.

CentOS Data Guard<方法二>:成功,但此方法非常危险,可能会造成数据库崩溃
SQL> show user;
USER is "SYS"
SQL> select status from v$instance;
STATUS
OPEN
SQL> update props$ set value$ = 'AL32UTF8' where name = 'NLS_CHARACTERSET';

1 row updated.SQL> update props$ set value$ = 'AL16UTF16' where name = 'NLS_NCHAR_CHARACTERSET';1 row updated.SQL> commit;Commit complete.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
/home/oracle>sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 15 17:15:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 272629760 bytes
Fixed Size 1218920 bytes
Variable Size 92276376 bytes
Database Buffers 176160768 bytes
Redo Buffers 2973696 bytes
Database mounted.
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 database character set AL32UTF8;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
/home/oracle>sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 15 17:21:15 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 272629760 bytes
Fixed Size 1218920 bytes
Variable Size 92276376 bytes
Database Buffers 176160768 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.

SQL>select * from v$nls_parameters;
1 NLS_LANGUAGE SIMPLIFIED CHINESE
2 NLS_TERRITORY CHINA
3 NLS_CURRENCY ?
4 NLS_ISO_CURRENCY CHINA
5 NLS_NUMERIC_CHARACTERS .,
6 NLS_CALENDAR GREGORIAN
7 NLS_DATE_FORMAT DD-MON-RR
8 NLS_DATE_LANGUAGE SIMPLIFIED CHINESE
9 NLS_CHARACTERSET WE8ISO8859P1
10 NLS_SORT BINARY
11 NLS_TIME_FORMAT HH.MI.SSXFF AM
12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
15 NLS_DUAL_CURRENCY ?
16 NLS_NCHAR_CHARACTERSET AL16UTF16
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE

关于CentOS Data Guard数据库更改字符集备库是否需要单独操作问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。

字符 字符集 数据 数据库 目标 问题 内容 更多 环境 超集 帮助 解答 易行 危险 成功 简单易行 小伙 小伙伴 方法 此方法 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 安徽电脑软件开发费用 南坪软件开发 access数据库 国二 厦门网络技术转让信息中心 怎么进西瓜星球服务器手机版 网络技术如何培训班 光遇服务器已满能不排队吗 如何提升网络安全整体性 广州大飞网络技术 驻马店审计局网络安全 dlcp服务器 火山安卓软件开发平 联盟端游服务器卡出炸弹人 网络安全工程师门槛高吗 达内网络安全工程师视频’ wps 数据库搭建 山东工业软件开发技术大赛 网络技术信息名词解释是什么 内网访问服务器存在带宽一说吗 数据库中的时间用什么数据类型 男生学习网络技术 2013年软件开发收费标准 华为通用软件开发工程师年薪 电脑访问不了服务器数据库 工业互联网科技公司新年贺词 基于服务器端的动态网页 关于网络安全的意见建议 目前主流的数据库有哪些 印度十大软件开发企业 湛江旅游软件开发常见问题
0