http://www.toadworld.com/platforms/oracle/w/wiki/1010.cancel-based-recovery.aspx

Cancel-Based recovery allows the DBA to cancel recovery at a desired point. This situation is most likely occur if archive logfiles or redo logfiles needed for recovery are lost or damaged and cannot be restored. In this situation, you would apply all logs until you reached the missing files and then cancel the recovery.

Follow these steps to execute a cancel-based recovery:

  1. If the database is still open, shut down the database using the SHUTDOWN command with the ABORT option.
  2. Make a full backup of the database, including all datafiles, a control file, and the parameter files in case an error is made during the recovery.
  3. Correct the problem that caused the media failure. If the problem cannot be corrected, the datafiles must be restored to an alternate location. If this is the case, the ALTER TABLESPACE RENAME DATAFILE command must be used to change the location of the datafile in the control file.
  4. If the current control files do not match the physical structure of the database at the time you want to recover to, restore a backup of the control file that matches the database's physical file structure at the point in time you want to recover to. Replace all current control files of the database with the one you want to use for recovery. If you do not have a backup copy of the control file, you can create a new one.
  5. Restore backups of all datafiles. Make sure the backups were taken before the point in time you are going to recover to. Any datafiles added after the point in time you are recovering to should not be restored. They will not be used in the recovery and will have to be recreated after recovery is complete. Any data in the datafiles created after the point of recovery will be lost.

    Make sure read-only tablespace are offline before you start recovery so recovery does not try to update the datafile headers.

  6. Start SQL*Plus and connect to Oracle as SYS.
  7. Start the instance and mount the database using the STARTUP command with the MOUNT option.
  8. If you restored files to an alternative location, change the location now in the control file by using the ALTER TABLESPACE RENAME DATAFILE command.
  9. Use the RECOVER DATABASE UNTIL CANCEL command to begin cancel-based recovery. If a backup of the control file is being used, make sure to specify the USING BACKUP parameter.

    Oracle will now start the roll forward by applying the archived redo logfiles and the online redo logfile. Oracle will prompt you for each logfile. If you used a backup control file, you must enter the names of the online redo logfiles.

  10. Continue applying redo logfiles until the most recent, undamaged logfile has been applied.

    Enter "CANCEL" instead of the logfile name to cancel the recovery. Oracle will respond with a recovery successful message.

  11. Use the ALTER DATABASE OPENcommand with the RESETLOGS or NORESETLOGS option. You should use the RESETLOGS option if you used a backup of the control file in recovery, or the recovery was incomplete. Use the NORESETLOGS option if the recovery was complete. If you are using a standby database and must reset the logs, the standby database will have to be re-created.

    You can check the ALERT file to see if your incomplete recovery was actually a complete recovery. If the recovery was a complete recovery, the message in the ALERT file is as follows

    RESETLOGS after complete recovery through change scn

    If the recovery was incomplete, the following message is recorded:

    RESETLOGS after incomplete recovery UNTIL CHANGE scn
  12. After opening the database using the RESETLOGS option, perform a normal shutdown and a full database backup. If you do not do this, any changes made after the recovery and before the next full backup are unrecoverable. If you did not reset the logs, the database is still recoverable.

Cancel-Based Recovery的更多相关文章

  1. 一看就会一做就废系列:说说 RECOVER UNTIL CANCEL

    这里是:一看就会,一做就废系列 数据库演示版本为 19.3 (12.2.0.3) 该系列涉及恢复过程中使用的 5 个语句: 1. recover database 2. recover databas ...

  2. ocp11g培训内部教材_053课堂笔记(043)_数据备份

    053:数据库高级管理: 目录 第一部分:数据库备份与恢复... 4 第一章:备份恢复概述... 4 1.1 备份的意义: 4 1.2 数据库故障的类型:... 4 1.3 制定你的备份和恢复的计划. ...

  3. 【RMAN】RMAN跨版本恢复(下)--大版本异机恢复

    [RMAN]RMAN跨版本恢复(下)--大版本异机恢复 BLOG文档结构图 ORACLE_SID=ORA1024G 关于10g的跨小版本恢复参考:http://blog.chinaunix.net/u ...

  4. RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例

    测试环境:     操作系统  :  Red Hat Enterprise Linux ES release 4 (Nahant Update 4)   VMWARE     数据库     :  O ...

  5. MPLS

    Multiprotocol Label Switching From Wikipedia, the free encyclopedia "MPLS" redirects here. ...

  6. 使用rman迁移数据库到异机

    迁移数据库的方法有多种,较为常用的则是使用RMAN来迁移.使用RMAN迁移数据库属于数据库的物理备份与恢复范畴,整个过程中数据库的相关信息是完整地镜像.因此,基于此种方式还原恢复的数据库用于测试会使得 ...

  7. Oracle的不完全恢复

    一.不完全恢复特性 1.不完全恢复 不完全恢复仅仅是将数据恢复到某一个特定的时间点或特定的SCN,而不是当前时间点.不完全恢复会影响整个数据库,需要在MOUNT状  态下进行.在不完全恢复成功之后,通 ...

  8. Oracle在归档模式下恢复

    =============== 数据库的完全恢复 =============== 在归档模式下数据库完全恢复时,数据库所经过的状态如下: 1.利用备份修复(Restores)损坏或丢失的数据文件,即将 ...

  9. 【测试】DG的主切备,备切主

    1.首先要应用日志,保持主备库一致: 备库:SBDB@SYS> recover managed standby database using current logfile disconnect ...

随机推荐

  1. 有关Math数学运算的js函数

    随机函数;  Moth.random()   //3.以下通过循环给数组每个元素赋值,随机数. // Math.random(); 可以随机0~1之间的任意数 [0,1) // alert(Math. ...

  2. MVCJSONJQuery分页实现

    思路: 1.用Ado.NET获取数据 2.控制器中创建一个方法参数为搜索条件 3.返回前台一个Json对象,把对象用一个类封装 4.用JQuery接收数据 public ActionResult In ...

  3. 使用sshtunnel实现python公网连接阿里云mongo服务器

    背景: 公司使用阿里云的云数据库MongoDB.基于安全原因考虑,阿里云MongoDB云数据库目前只支持从阿里云ECS上访问,无法通过公网直接访问,不方便用户在本地开发环境里直接进行测试. 阿里云官方 ...

  4. ZOJ - 3471

    壮压水一水,刚开始脑残了非要开两维dp... #include<cstdio> #include<cstring> #include<algorithm> #def ...

  5. 【Java】 剑指offer(58-1) 翻转单词顺序

      本文参考自<剑指offer>一书,代码采用Java语言. 更多:<剑指Offer>Java实现合集   题目 输入一个英文句子,翻转句子中单词的顺序,但单词内字符的顺序不变 ...

  6. 《Android进阶之光》--View体系与自定义View

    No1: View的滑动 1)layout()方法的 public class CustomView extends View{ private int lastX; private int last ...

  7. 洛谷 P1004 方格取数 【多进程dp】

    题目链接:https://www.luogu.org/problemnew/show/P1004 题目描述 设有N*N的方格图(N<=9),我们将其中的某些方格中填入正整数,而其他的方格中则放 ...

  8. 使用MSF发现主机和端口扫描

    使用MSF发现主机和端口扫描 使用search命令查找需要的模块 MSF模块太多,记不住怎么办!!! 我们不需要记住所有模块,我们只要能找到我们想用的模块就行,平时积累使用的模块也行哦! 比如,我们通 ...

  9. 一道有意思的多线程面试题 C# 代码实现

    如果你对多线程的控制不怎么了解,那么理解了这篇文章的内容也许对你有帮助.鼓励先自己动手实现一遍,做不出来在看代码. 题目一:两个线程交替打印0~100的奇偶数 这道题就是说有两个线程,一个名为偶数线程 ...

  10. 利用Solr服务建立的站内搜索雏形

    最近看完nutch后总感觉像好好捯饬下solr,上次看到老大给我展现了下站内搜索我便久久不能忘怀.总觉着之前搭建的nutch配上solr还是有点呆板,在nutch爬取的时候就建立索引到solr服务下, ...