温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

oracle 11.2.0.4 DataGuard Broker配置过程中可能遇到的问题有哪些

发布时间:2021-11-10 11:39:01 来源:亿速云 阅读:323 作者:小新 栏目:关系型数据库

这篇文章主要介绍了oracle 11.2.0.4 DataGuard Broker配置过程中可能遇到的问题有哪些,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。


1、归档参数log_archive_dest_2设置不当导致的主备库告警日志警告
问题现象:
主库
Web Apr 11 14:17:16 2018
RFS[85]: Assigned to RFS proess 28893
RFS[85]: Database mount ID mismatch [0x59764e70:0x5976ad14](1500925552:1500949780)
RFS[85]: Client instance is standby database instead of primary
RFS[85]: Not using real application clusters

备库
Web Apr 11 14:12:16 2018
PING[ARC2]: Heartbeat failed to connect to standby 'dbprimary'. Error is 16009.
处理办法(MOS文档 ID 1450132.1):
备库执行
alter system set log_archive_dest_state_2=defer scope=both sid='*'
或者
alter system set log_archive_dest_2='service=dbstandby arch sync valid_for=(online_logfiles,primary_role) db_unique_name=orcls' scope=both sid='*';

2、由于主备库数据文件路径不一致且未适当设置db_file_name_convert和log_file_name_convert参数导致DDL无法同步到备库
问题现象:
主库告警日志
ORA-01111:name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/opt/oracle/product/11.2.0.4/db/dbs/UNNAMED00005
ora-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01111: name for data file 5 is unknow - rename to correct file
ORA-01110: data file 5: '/opt/oracle/product/11.2.0.4/db/dbs/UNNAMED00005

处理办法:
主备库检查convert参数
SQL>show parameter convert
NAME       TYPE          VALUE
--------------         -----------     --------------------------------------------
_convert_set_to_join   bollean         FALSE
db_file_name_convert   string          /opt/oracle/oradata/,/opt/oracle/oradata/
log_file_name_convert  string          /opt/oracle/oradata/,/opt/oracle/oradata/
DGMGRL检查主备库DG映射参数
DGMGRL>show configuration
Configuration - dgb_p
Protection Mode:Maxperformance
Databases:
  orcl  - Primary database
warning:ORA-16792: configurable property value is inconsistent with database setting
  orcls - Physical standby database
warning:ORA-16792: configurable property value is inconsistent with database setting
Fast-Start Failover:DISABLED
DGMGRL>show database ORCL
Database - orcl
Role: PRIMARY
Intended State:TRANSPORT-ON
Instance(s):
  orcl
    warning:ORA-16714:the value of property DbFileNameConvert is inconsistent with the database setting
Database Status:
WARNING
--通过verbose参数查看具体的DbFileNameConvert参数值
show database VERBOSE ORCL

备库执行
alter database recover managed standby database cancel;
alter database create datafile  '/opt/oracle/product/11.2.0.4/db/dbs/UNNAMED00005'  as  '/opt/oracle/oradata/test01.dbf';

备库重新启动日志应用进程
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

主备库的启动参数文件中加入,然后重新生成spfile
*.db_file_name_convert='/opt/oracle/oradata','/opt/oracle/oradata'
DGMGRL控制台执行
DGMGRL>edit database orcl set property DbFileNameConvert = '/opt/oracle/oradata/,/opt/oracle/oradata/';

3、oracle dg配置时主备库的db_unique_name不能相同,否则备库无法添加而报错
问题现象:
DGMGRL控制台添加备库时报错
DGMGRL> add database orcls as connect identifier is dbstandby maintained as physical;
Error: ORA-16642: DB_UNIQUE_NAME mismatch.

处理办法:
修改备库启动pfile中的db_unique_name(没有该参数则添加)值与主库中的db_unique_name值不同
重新生成spfile,重启备库

4、通过rman duplicate主库到备机时sys用户无法通过tns服务名登录主备库
问题现象:
[oracle@centdgpri ~]$ tnsping dbprimary
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 16-APR-2018 00:35:27
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL =TCP)(HOST=centdgpri)(PORT=1521))) (CONNECT_DATA=(SID=orcl)(SERVER=DEDICATED)))
OK (160 msec)
[oracle@centdgpri ~]$ sqlplus "sys/WaterH2o@dbprimary as sysdba" 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 16 00:36:46 2018
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

问题处理:
确认sys密码正确
如下SQL到主库查询无数据
SELECT * FROM V$PWFILE_USERS;
主库oracle用户执行如下命令,orapwd的文件名字是orapw$ORACLE_SID,路径是$ORACLE_HOME/dbs下,否则生成的文件无效

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=WaterH2o entries=30 force=y
再次查询确认
oracle 11.2.0.4 DataGuard Broker配置过程中可能遇到的问题有哪些

oracle 11.2.0.4 DataGuard Broker配置过程中可能遇到的问题有哪些


5、oracle DG Broke相关ADG特性使用中要求主备库打开闪回,而oracle rman duplicate克隆的备库没有自动打开闪回,
对备库打开闪回功能的时候需要注意
停止日志进程
recover managed standby database cancel;
创建闪回目录
mkdir -p /opt/oracle/flash_recovery_area
设置数据库闪回参数
alter system set db_recovery_file_dest_size=10g;
alter system set db_recovery_file_dest='/opt/oracle/flash_recovery_area';
打开数据库闪回功能
alter database flashback on;
确认数据库闪回打开
select name,db_unique_name,flashback_on from v$database;

感谢你能够认真阅读完这篇文章,希望小编分享的“oracle 11.2.0.4 DataGuard Broker配置过程中可能遇到的问题有哪些”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI