Cancel-Based Recovery
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:
- If the database is still open, shut down the database using the SHUTDOWN command with the ABORT option.
- 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.
- 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.
- 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.
- 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.
- Start SQL*Plus and connect to Oracle as SYS.
- Start the instance and mount the database using the STARTUP command with the MOUNT option.
- If you restored files to an alternative location, change the location now in the control file by using the ALTER TABLESPACE RENAME DATAFILE command.
- 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.
- 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.
- 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
- 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的更多相关文章
- 一看就会一做就废系列:说说 RECOVER UNTIL CANCEL
这里是:一看就会,一做就废系列 数据库演示版本为 19.3 (12.2.0.3) 该系列涉及恢复过程中使用的 5 个语句: 1. recover database 2. recover databas ...
- ocp11g培训内部教材_053课堂笔记(043)_数据备份
053:数据库高级管理: 目录 第一部分:数据库备份与恢复... 4 第一章:备份恢复概述... 4 1.1 备份的意义: 4 1.2 数据库故障的类型:... 4 1.3 制定你的备份和恢复的计划. ...
- 【RMAN】RMAN跨版本恢复(下)--大版本异机恢复
[RMAN]RMAN跨版本恢复(下)--大版本异机恢复 BLOG文档结构图 ORACLE_SID=ORA1024G 关于10g的跨小版本恢复参考:http://blog.chinaunix.net/u ...
- RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例
测试环境: 操作系统 : Red Hat Enterprise Linux ES release 4 (Nahant Update 4) VMWARE 数据库 : O ...
- MPLS
Multiprotocol Label Switching From Wikipedia, the free encyclopedia "MPLS" redirects here. ...
- 使用rman迁移数据库到异机
迁移数据库的方法有多种,较为常用的则是使用RMAN来迁移.使用RMAN迁移数据库属于数据库的物理备份与恢复范畴,整个过程中数据库的相关信息是完整地镜像.因此,基于此种方式还原恢复的数据库用于测试会使得 ...
- Oracle的不完全恢复
一.不完全恢复特性 1.不完全恢复 不完全恢复仅仅是将数据恢复到某一个特定的时间点或特定的SCN,而不是当前时间点.不完全恢复会影响整个数据库,需要在MOUNT状 态下进行.在不完全恢复成功之后,通 ...
- Oracle在归档模式下恢复
=============== 数据库的完全恢复 =============== 在归档模式下数据库完全恢复时,数据库所经过的状态如下: 1.利用备份修复(Restores)损坏或丢失的数据文件,即将 ...
- 【测试】DG的主切备,备切主
1.首先要应用日志,保持主备库一致: 备库:SBDB@SYS> recover managed standby database using current logfile disconnect ...
随机推荐
- ROS----TUT-RIM协作机器人和Actin-ROS接口
TUT-RIM: Collaborative Intelligent Heavy Machinery and Robotics http://www.ros.org/news/2017/02/tutr ...
- VS-常用的快捷键-总结
1: 快速添加引用 === Shift+Alt+F10; 也可用于实现抽象类 2: 直接添加属性 ===prop+Tab+Tab; 3: 根据字段添加属性 === Ctrl +r+e; 4: 格式化代 ...
- javafx基于使用fxml布局的tableview数据绑定用法
来个简单明了的 fxml的tableview数据绑定和java代码方式的数据绑定很像,不同的在于要有一到映射 首先看个目录 1.界面文件Sample.fxml <?xml version=&qu ...
- hdu 1258 从n个数中找和为t的组合 (DFS)
题意:首先给你一个t,然后是n,后面输入n个数,然后让你求的是n个数中和为t的序列总共有多少种,把他们按从左到右的顺序输出来. Sample Input4 6 4 3 2 2 1 15 3 2 1 1 ...
- asp.net core 微信扫码支付(扫码支付,H5支付,公众号支付,app支付)之1
2018-08-13更新生成二维码的方法 在做微信支付前,首先要了解你需要什么方式的微信支付,目前本人做过的支付包含扫码支付.H5支付.公众号支付.App支付等,本人使用的是asp.net mvc c ...
- BZOJ5120 [2017国家集训队测试]无限之环 费用流
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - BZOJ5120 题意概括 原题挺简略的. 题解 本题好难. 听了任轩笛大佬<国家队神犇>的讲课才 ...
- BZOJ5074 小B的数字 BZOJ2017年10月月赛 其他
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - BZOJ5074 题意概括 题解 作为蒟蒻的我第一个就选择了过的人最多的D题. 不仔细看好吓人. 然而并不难. ...
- 010 Spark中的监控----日志聚合的配置,以及REST Api
一:History日志聚合的配置 1.介绍 Spark的日志聚合功能不是standalone模式独享的,是所有运行模式下都会存在的情况 默认情况下历史日志是保存到tmp文件夹中的 2.参考官网的知识点 ...
- C++ 冒泡排序、选择排序、快速排序
#include<stdio.h> #define N 10 void swap(int *p1, int *p2); void BubbleSort(int *a); void Sele ...
- POJ 1279 Art Gallery【半平面交】(求多边形的核)(模板题)
<题目链接> 题目大意: 按顺时针顺序给出一个N边形,求N边形的核的面积. (多边形的核:它是平面简单多边形的核是该多边形内部的一个点集该点集中任意一点与多边形边界上一点的连线都处于这个多 ...