当前位置: 首页 > news >正文

pdb restore in ADG database

Effect of PITR on Dataguard Environment (Standby MRP Crashed with ORA-39873) (Doc ID 1591492.1)​编辑To Bottom


In this Document

Symptoms
Cause
Solution

APPLIES TO:

Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

 This document explains how to overcome MRP Crash with ORA-39874 and ORA-39873 after a Point in time (PITR) recovery on Primary.

-----Stnadby Alert log-----------

Recovery of pluggable database <PDB NAME> aborted due to pluggable database open resetlog marker.
To continue recovery, restore all data files for this PDB to checkpoint SCN lower than 3961537, or timestamp before 10/10/2013 04:55:31, and restart recovery
MRP0: Background Media Recovery terminated with error 39874
.
Errors in file /u01/app/oracle/diag/rdbms/<standby db name>/<SID>/trace/<SID>_mrp0_15640.trc:
ORA-39874: Pluggable Database <PDB NAME> recovery halted
ORA-39873: Restore all data files to a checkpoint SCN lower than 3961537.

CAUSE

Standby is ahead of primary RESETLOGS changes on <PDB NAME> . <PDB NAME> have two datafiles i.e datafile 12 and 13.

SOLUTION

 1. Make sure the corresponding standby PDB is closed.

SQL>alter pluggable database <PDB NAME> close;


2. The error is expected if the DG broker is enabled. If DG broker is enabled then Stop the Apply via DG broker to avoid dg broker automatic restart of MRP.

DGMGRL>edit database chicago set state=apply-off;


3. If Standby in ADG then mount it.

SQL>select database_role,open_mode from v$database;

SQL>shutdown immediate;
SQL>startup mount


We have two options to recover Standby PDB.

OPTION I (Restore PDB)

1. If Standby is the backup server the go for direct restore because standby have the old backups.

On Standby,

RMAN> list  backup of pluggable database <PDB NAME>;


NOTE : The backup SCN should be less or equal to PITR SCN. If no backup exist of lessr SCN then copy backuppiece which have less or equal SCN from primary

2. Get the PDB name SCN from the standby alert log error message (ORA-39874 and ORA-39873).

RMAN>restore pluggable database <PDB DB> until scn <primary PITR SCN>;

Ex,

RMAN>restore pluggable database <PDB NAME> until scn 3961537;

------Standby Alert log---------------

Restore ..until SCN 2. Falshback to SCN
Full restore complete of datafile 12 <PATH>/pdbseed/system01.dbf.  Elapsed time: 0:00:14
  checkpoint is 3961537
  last deallocation scn is 3961537
  Undo Optimization current scn is 3951674
Thu Oct 10 05:55:45 2013
Full restore complete of datafile 13 <PATH>/pdbseed/sysaux01.dbf.  Elapsed time: 0:00:25
  checkpoint is 3961537
  last deallocation scn is 1362129


NOTE :After Restore do not start MRP immediately. If MRP started by mistakenly before the standby SYNCup with primary then MRP will crash with ORA-65138. The same applies to primary flashback to <SCN>

Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 65138
.
Errors in file /u01/app/oracle/diag/rdbms/<standby db name>/<SID>/trace/<SID>_mrp0_18820.trc:
ORA-65138: Data file 12 of pluggable database <PDB NAME> belongs to an orphan PDB incarnation.
ORA-01110: data file 12: '<PATH>/pdbseed/system01.dbf'
Managed Standby Recovery not using Real Time Apply


 To Resolve,

 a. Take fresh backup of PDB from primary

RMAN> backup pluggable database <PDB NAME>;


 b. Copy the backuppiece to Standby.
 c. On Standby restore PDB.

RMAN> restore pluggable database <PDB NAME>;



3. Finally Open database,PDB and start MRP.

RMAN>alter database open;
RMAN>alter pluggable database <PDB NAME> open;
RMAN>alter database recover managed standby database disconnect;

 NOTE : If DG broker enable,start MRP using,
 DGMGRL>edit database chicago ser state=apply-on;
 
OPTION II

1. If Flashback is enabled then do flashback to scn 1362129.

SQL>flashback database to scn <primary PITR SCN>;

Ex,

SQL>flashback database to scn 3961537;


2. Open database,PDB and start MRP.

 

RMAN>alter database open;
RMAN>alter pluggable database <PDB NAME> open;
RMAN>alter database recover managed standby database disconnect;
RMAN> restore pluggable database <PDB NAME>;

  

NOTE : If DG broker enable,start MRP using,
DGMGRL>edit database chicago set state=apply-on;

http://www.lryc.cn/news/233013.html

相关文章:

  • 科创人·蓝凌董事长杨健伟:夯实“四梁八柱”,让数字化“城中村上建高楼”
  • Flink SQL --Flink 整合 hive
  • demo(一)eureka----服务注册与提供
  • core dump(介绍,status中的core dump标志,应用--调试),ulimit命令
  • 使用键盘管理器更改键盘快捷键,让键盘真正迎合你的使用习惯
  • putty保存登录账号和密码
  • GRS认证是什么认证为何如此重要
  • 基于pytest-bdd的项目目录结构和命名规范
  • web前端开发网页设计课堂作业/html练习《课程表》
  • 用欧拉路径判断图同构推出reverse合法性:1116T4
  • 高阶数据结构---树状数组
  • 如何保护PayPal账户安全:防止多个PayPal账号关联?
  • 关于 Spring :松耦合、可配置、IOC、AOP
  • pytorch tensor数据类型转换为python数据
  • HarmonyOS开发:动态共享包的依赖问题
  • 中睿天下加入中关村华安关键信息基础设施安全保护联盟
  • 【c++STL算数仿函数,关系仿函数,逻辑仿函数】
  • 产品经理的能力模型是什么?
  • 缓存和DB一致性
  • netty websockt之断连重试
  • 【Gateway】基于ruoyi-cloud-plus项目,gateway局部过滤器和过滤返回以及集成nacos
  • mysql -mmm
  • C++初阶 类和对象(下)
  • 使用Postman进行压力测试
  • AI视频检索丨历史视频标签化,助力重要事件高效溯源
  • 【前段基础入门之】=>CSS3新特性 响应式布局
  • 【Java 进阶篇】JQuery 遍历:发现元素的魔法之旅
  • 合肥数字孪生赋能工业制造,加速推进制造业数字化转型
  • Linux发展史与环境安装
  • 【uniapp】 video视频层级、遮挡其他弹窗或顶部导航 使用nvue覆盖