incarnation flashback database 时可以 offline 不符合的 datafile

这篇具有很好参考价值的文章主要介绍了incarnation flashback database 时可以 offline 不符合的 datafile。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

How do we flashback a database to a guaranteed restore point (GRP) that has 2 tablespaces with flashback off after a RESETLOGS was done?

Flashback fails with the errors below.  It fails on the datafiles for the two tablespaces with flashback off.

RMAN-03002: failure of flashback command at 09/27/2013 15:14:24
ORA-38753: Cannot flashback data file 2229; no flashback log data.
ORA-01110: data file 2229: '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.27472.826360617'

SOLUTION

We need to restore the datafiles for the two tablespaces from a backup, offline those same files, flashback to GRP, online the files again then recover to the GRP SCN. 

Note: Because RESETLOGS was done we'll also have to reset the incarnation. Otherwise that step can be skipped.

1. Restore the datafiles for those two tablespaces from a backup.

Note: The restored files are dated Sept 26th while all other datafiles are current (Sept 28th). The GRP is Sept 27th.

STATUS      CHECKPOINT_CHANGE# FUZ CHECKPOINT_TIME                  COUNT(*)
------- ---------------------- --- ----------------------------- -----------
OFFLINE           104379205366 NO  26-SEP-2013 21:17:26                    1
OFFLINE           104379205549 NO  26-SEP-2013 21:19:06                    1
OFFLINE           104379205557 NO  26-SEP-2013 21:19:14                    1
OFFLINE           104379205610 NO  26-SEP-2013 21:19:57                    1
OFFLINE           104379206069 NO  26-SEP-2013 21:21:29                    1
OFFLINE           104379206276 NO  26-SEP-2013 21:22:23                    1
OFFLINE           104379206428 NO  26-SEP-2013 21:23:10                    1
OFFLINE           104379206445 NO  26-SEP-2013 21:23:21                    2
OFFLINE           104379206480 NO  26-SEP-2013 21:23:41                    2
OFFLINE           104379206520 NO  26-SEP-2013 21:24:16                    1
ONLINE            104398694790 YES 28-SEP-2013 08:42:03                 2221

11 rows selected.

Database is currently in MOUNT.

2. After the restore make sure those restored files are OFFLINE before the flashback is done or it will fail with the same errors.

ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29237.826360609' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29345.826360597' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29341.826360579' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29338.826360575' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29337.826360571' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29238.826360611' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29239.826360615' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29240.826360615' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.12744.826360617' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.34180.826360617' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.33245.826360617' offline;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.27472.826360617' offline;

3. Flashback to the guaranteed restore point (GRP).

SQL> FLASHBACK DATABASE TO RESTORE POINT '<RestorePointName>';

Starting flashback at 13-09-28 10:20
...
starting media recovery archived log for thread 1 with sequence 843 is already on disk as file +<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_27/thread_1_seq_843.33236.827237895
media recovery complete, elapsed time: 00:00:15
Finished flashback at 13-09-28 10:27

4. Online all the datafiles for the two tablespaces.

ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29345.826360597' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29341.826360579' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29338.826360575' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29337.826360571' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29238.826360611' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29239.826360615' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.29240.826360615' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.12744.826360617' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.34180.826360617' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.33245.826360617' online;
ALTER DATABASE DATAFILE '+<AsmDiskGroup>/<db_unique_name>/datafile/<FileName>.27472.826360617' online;

5. Because the database was opened with resetlogs we have to reset the incarnation to before resetlogs was done.

RMAN> list incarnation;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1            <db_name> 2189369331 PARENT 73600365279 11-12-28 01:45
2       2           <db_name> 2189369331 PARENT 104113554484 13-09-17 07:41 <<< We need to be in this incarnation to recover to 9-27-2013. Use the INC KEY.
3       3           <db_name> 2189369331 CURRENT 104390300886 13-09-28 07:04

RMAN> reset database to incarnation 2;

database reset to incarnation 2

6. Do RECOVER UNTIL CHANGE using the SCN of the GRP +1. The UNTIL recovers to right before the SCN specified.

SQL> select name,scn,time,database_incarnation#,guarantee_flashback_database,storage_size from v$restore_point;

NAME SCN TIME DATABASE_INCARNATION# GUARANTEE_FLASHBACK_DATABASE STORAGE_SIZE
-------------------- ------------------- -------------------------------------- --- ----------------
<RestorePointName> 104390296851 27-SEP-13 12.14.11.000000000 PM 2 YES 15728640000

1 row selected.

SQL> RECOVER DATABASE UNTIL CHANGE 104390296852;

ORA-00279: change 104379205366 generated at 09/26/2013 21:17:26 needed for thread 1 ORA-00289:
suggestion : +<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_28/thread_1_seq_788.39097.827318825 ORA-00280:
change 104379205366 for thread 1 is in sequence #788 Specify log: {=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 104379207088 generated at 09/26/2013 21:27:03 needed for thread 1 ORA-00289:
suggestion : +<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_28/thread_1_seq_789.23582.827318825 ORA-00280:
change 104379207088 for thread 1 is in sequence #789 ORA-00278: log file '+<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_28/thread_1_seq_788.39097.827318825' no longer needed for this recovery
....
ORA-00279: change 104390280294 generated at 09/27/2013 11:55:45 needed for thread 1 ORA-00289:
suggestion : +<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_27/thread_1_seq_843.33236.827237895 ORA-00280:
change 104390280294 for thread 1 is in sequence #843 ORA-00278: log file '+<AsmDiskGroup>/<db_unique_name>/archivelog/2013_09_27/thread_1_seq_842.21570.827236545' no longer needed for this recovery Log applied.
Media recovery complete.

SYS> alter database open resetlogs;
Database altered.

7. To enable the flashback on tablespaces:

SQL> alter tablespace <tablespace_name> flashback on;文章来源地址https://www.toymoban.com/news/detail-686591.html

到了这里,关于incarnation flashback database 时可以 offline 不符合的 datafile的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • GeminiDB Cassandra接口新特性FLASHBACK发布:任意时间点秒级闪回

    本文分享自华为云社区《GeminiDB Cassandra接口新特性FLASHBACK发布:任意时间点秒级闪回》,作者: GaussDB 数据库。 数据库作为现代信息系统的核心组成部分,承担着存储、管理和检索大量数据的重要任务。然而,在实际的业务运行过程中,由于各种原因,数据库可能会出现异常

    2024年04月08日
    浏览(69)
  • Flashback of PDB ORA-39867 打开前一个GRP点后不能再前进了

    CHANGES 1. Created Restore Point P1 and then created another Restore Point P2. SQL show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO SQL SQL alter session set container=pdb1; Session altered. SQL create restore point P1 guarantee flashback database; Res

    2024年01月22日
    浏览(43)
  • adb命令删除offline离线手机设备

    在调试Android应用过程中,经常会使用adb命令,比如检测设备连接状态时,会使用 adb devices ,在使用该adb命名时发现总有一个离线设备,影响调试,如下: 尝试过如下方法来删除离线设备,在我这里都解决不了。 https://blog.csdn.net/chichoxian/article/details/96426418 https://blog.csdn.net/

    2023年04月09日
    浏览(35)
  • 解决手机ADB连接状态为offline的问题

    解决手机ADB连接状态为offline的问题 在进行 Android 开发过程中,我们经常需要使用 ADB(Android Debug Bridge)工具与手机建立连接,以便进行调试和测试。然而,有时候我们可能会遇到手机连接状态显示为\\\"offline\\\"的问题,这会导致无法正常进行调试操作。下面我将介绍一种解决这

    2024年02月08日
    浏览(71)
  • Mali Offline Compiler - 官方视频教学 - 笔录

    便于后续不用反复观看视频 直接截图 + 字幕说明,文档化 如果你喜欢的话,也可以直接再 油管上直接,选择:搜索视频,查看字幕来定位播放对应时间进度内容 参考:Arm Mali GPU Training - Episode 3.5: Mali Offline Compiler 命令行 ls 列出文件 比如这个 shader 用于游戏中 角色溶解的效

    2024年02月12日
    浏览(21)
  • adb介绍、环境配置及设备offline解决方法。

    什么是adb? adb是android sdk里的一个工具(相当于一个debug工具),用这个工具可以直接操作管理android模拟器或者真实的android设备。 adb能用来做什么 可以使用adb管理设备或手机模拟器状态,可以对手机进行安装软件、系统升级、运行shell命令、拷贝推送文件、查看设备硬件信

    2024年02月07日
    浏览(34)
  • Linux下Spark offline安装graphframes包

    GraphX是Spark中用于图计算的模块. Spark安装包中内置Scala语言的GraphX库, 但是对于Python语言的安装包, 需要额外进行安装. 对于内网服务器, 不能访问外网, 安装GraphX的python库graphframes需要进行额外的步骤, 本文介绍如何在Linux下offline为Spark 安装graphframes包. 下载spark-3.5.0-bin-hadoop3.t

    2024年02月20日
    浏览(48)
  • 动态场景建图 Removert(offline) 和 DynamicFilter(online)前端部分对比

    简单来说2020年的REMOVERT是针对动态环境下的建图进行优化的一篇很好的作品。 针对的 主要问题 :若是采用点云特征进行匹配的话,动态障碍物在预处理阶段也会被剔除。那么,另一个方面,动态障碍物对点云地图的构建的影响在于会在最终生成的地图中产生“鬼影”,而若

    2024年02月11日
    浏览(32)
  • ARM Mobile Studio - Mali Offline Compiler - 官方视频教学 - 笔录

    便于后续不用反复观看视频 直接截图 + 字幕说明,文档化 如果你喜欢的话,也可以直接再 油管上直接,选择:搜索视频,查看字幕来定位播放对应时间进度内容 参考:Arm Mali GPU Training - Episode 3.5: Mali Offline Compiler 命令行 ls 列出文件 比如这个 shader 用于游戏中 角色溶解的效

    2024年02月15日
    浏览(26)
  • 论文阅读--Conservative Q-Learning for Offline Reinforcement Learning

    摘要 在强化学习( RL )中有效地利用以前收集的大量数据集是大规模实际应用的关键挑战。离线RL算法承诺从先前收集的静态数据集中学习有效的策略,而无需进一步的交互。然而,在实际应用中,离线RL是一个主要的挑战,标准的离线RL方法可能会由于数据集和学习到的策略之

    2024年04月17日
    浏览(61)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包