DG11g备库ORA-19909 ORA-01110

2023-10-08 09:01
文章标签 ora dg11g 备库 19909 01110

本文主要是介绍DG11g备库ORA-19909 ORA-01110,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

问题场景

巡检发现备库状态不正常,open_mode由read only with apply 变成了read only。原因:主库做过rman备份恢复,因为是同一个库恢复出来的,所以备库认为这些归档也是主库产生的,所以会注册进去。

问题分析

查主备状态

#部署时主备状态
--主库信息   switchover显示to standby或者session active为正常
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	   DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ WRITE		 PRIMARY	  MAXIMUM PERFORMANCE  session active--备库信息
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	        DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM PERFORMANCE  NOT ALLOWED#巡检时主备状态
--主库信息   switchover显示to standby或者session active为正常
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	   DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ WRITE		 PRIMARY	  MAXIMUM PERFORMANCE  session active--备库信息
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	        DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ ONLY  PHYSICAL STANDBY MAXIMUM PERFORMANCE  NOT ALLOWED

查告警日志

tail -200f $ORACLE_BASE/diag/rdbms/btopicis/btopicis/trace/alert_btopicis.log
Fri Oct 06 22:05:03 2023
Managed Standby Recovery starting Real Time Apply
Warning: Recovery target destination is in a sibling branch在同级分支中
of the controlfile checkpoint. Recovery will only recover
changes to datafiles.
Datafile 1 (ckpscn 212602019) is orphaned on incarnation#=2  孤儿化身
MRP0: Detected orphaned datafiles! 
Recovery will possibly be retried after flashback...
Errors in file /gs/u01/app/oracle/diag/rdbms/btopicis/btopicis/trace/btopicis_pr00_742.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation    孤儿化身
ORA-01110: data file 1: '/gs/oradata/btopicis/system01.dbf'
Managed Standby Recovery not using Real Time Apply
Recovery Slave PR00 previously exited with exception 19909

查主备化身

主库
image.png
备库
image.png

解决办法1

重置备库化身和主库保持一致

将备库置为mount,然后reset database to incarnation 3;

--备库
shutdown immediate
startup mount
rman target / 
reset database to incarnation 3;
list incarnation;

打开备库和备库开启日志应用

#开启备库
alter database open;
#备库开启日志实时应用
alter database recover managed standby database using current logfile disconnect from session;
#查看进程
select pid,process, status, thread#,sequence#, block#, blocks from v$managed_standby;

查主备库状态

--主库信息   switchover显示to standby或者session active为正常
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	   DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ WRITE		 PRIMARY	  MAXIMUM PERFORMANCE  session active--备库信息
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	        DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
btopicis		READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM PERFORMANCE  NOT ALLOWED

注意事项

备库必须mount下,不然会报错

解决办法2

将备库重新和主库同步

#备库关库
shutdown immediate
#启动到nomount
startup nomount
#主库上操作 使用RMAN auxiliary恢复数据库,会覆盖原来的数据文件日志文件控制文件密码文件,原有文件不用删除
rman target 'sys/"top@123"'@fuwa auxiliary 'sys/"top@123"'@wafu
duplicate target database for standby from active database nofilenamecheck;
#备库上操作  打开备库
alter database open;
select open_mode from v$database;   #READ ONLY 
备库启用日志实时应用
备库open read only用
alter database recover managed standby database parallel 10 using current logfile disconnect from session;
#查看主备状态
--主库信息   switchover显示to standby或者session active为正常
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	   DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ WRITE		 PRIMARY	  MAXIMUM PERFORMANCE  TO STANDBY--备库信息
set linesize 999
select name,open_mode,database_role,protection_mode,switchover_status from v$database;
NAME		OPEN_MODE	        DATABASE_ROLE    PROTECTION_MODE	 SWITCHOVER_STATUS  
topicis		READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM PERFORMANCE  NOT ALLOWED

补充1:系统时间和scn时间不一致

#查看当前延迟情况(比较时间和服务器时间)
SELECT name, value, datum_time, time_computed FROM V$DATAGUARD_STATS WHERE name like 'apply_lag';
#监控数据库recovey操作,以及所需时间的估算
select * from v$recovery_progress;
v$recovery_progress视图可以用来监控数据库recovey操作,以及所需时间的估算,此外,可以用来监控physical standbr环的redo应用速度.
#系统时间
date
#scn时间
select scn_to_timestamp(current_scn) from v$database;


解决办法

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
!date -s 时间
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

补充2:Oracle 中的 Incarnation 到底是个什么?实验操作篇 - askscuti - 博客园

参考链接:https://blog.csdn.net/hezuijiudexiaobai/article/details/123899317

这篇关于DG11g备库ORA-19909 ORA-01110的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/164184

相关文章

ora-01017 ora-02063 database link,oracle11.2g通过dblink连接oracle11.2g

错误图示: 问题解决 All database links, whether public or private, need username/password of the remote/target database. Public db links are accessible by all accounts on the local database, while private

ORA-25150:不允许对区参数执行ALTERING

在用PL/SQL工具修改表存储报错: 百度一下找到原因: 表空间使用本地管理,其中的表不能修改NEXT MAXEXTENTS和PCTINCREASE参数 使用数据自动管理的表空间,其中的表可以修改NEXT MAXEXTENTS和PCTINCREASE参数

ORA-01861:文字与格式字符串不匹配

select t.*, t.rowid from log_jk_dtl t; insert into log_jk_dtl (rq,zy,kssj,jssj,memo)  values (to_date(sysdate,'yyyy-mm-dd'),'插入供应商', to_char(sysdate,'hh24:mi:ss'),to_char(sysdate,'hh24:mi:ss'),'备注'

利用PL/SQL工具连接Oracle数据库的时候,报错:ORA-12638: 身份证明检索失败的解决办法

找到相对应的安装目录:比如:E:\oracle\product\10.2.0\client_1\NETWORK\ADMIN 在里面找到:SQLNET.AUTHENTICATION_SERVICES= (NTS) 将其更改为:SQLNET.AUTHENTICATION_SERVICES= (BEQ,NONE) 或者注释掉:#SQLNET.AUTHENTICATION_SERVICES= (N

ORA-00600 [1880]

-----环境信息 [oracle@trsen02 bdump]$ uname -a Linux trsen02.yto.com 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux SQL> select * from v$version; BANNER ----

ORA-31626/ORA-31638/ORA-39077/ORA-6502

导数据遇到ORA-31626/ORA-31638/ORA-39077/ORA-6502 报错信息如下: [oracle@vm010148 ~]$ expdp system/oracle directory=dir dumpfile=full.dmp logfile=full.log Export: Release 11.2.0.3.0 - Production on Sun Sep

ORA-00600 [504]

ALERT日志: Wed Sep 10 09:00:53 2014 Errors in file /u01/app/oracle/diag/rdbms/trsendb/trsendb2/trace/trsendb2_ora_40371414.trc  (incident=821340): ORA-00600: internal error code, arguments: [504],

【oracle sql错误】ORA-01795: 列表中的最大表达式数为 1000

select SOURCE_ID,FILTER_TEXT from TEXT_CENTER where SOURCE_ID in() in后面的括号里的数目超过1000条。 问题描述: SQL进行IN查询时,IN中的数据量不能超过1000条。 解决办法: 拆分:id in (1,2,3,4,5,,,,999) or id in(1000,1001,1002,1003,1004,,,,,,

Oracl查询报错:ORA-29275: 部分多字节字符

报错描述 --使用oracl的sql查询时候,此sql无误:SELECT DISTINCT MS_BRDA.MZHM as patientId,MS_BRDA.BRXM as name,CASEWHEN MS_BRDA.BRXB = 1 THEN '男'WHEN MS_BRDA.BRXB = 2 THEN '女'ELSE '未知'END

ORA-24067: exceeded maximum number of subscribers for queue ADMIN.SMS_MT_QUEUE

临时处理办法: delete from aq$_ss_MT_tab_D;delete from aq$_ss_MT_tab_g;delete from aq$_ss_MT_tab_h;delete from aq$_ss_MT_tab_i;delete from aq$_ss_MT_tab_p;delete from aq$_ss_MT_tab_s;delete from aq$