问题原因: 误操作,需要时间点恢复。
备份情况:rman 备份,每天一次全备份,并且附带备份当天所有产生的archivelog,无expdp备份
恢复目标: 恢复到9号晚上21点数据
源系统:WINDOWS2008R2,数据库版本如下:
SQL> select * from v$version; BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
目标系统: WINDOWS2012 R2 数据库版本如下:
SQL> select * from v$version; BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
恢复步骤:
1:目标系统安装oracle软件,不进行建库操作,略过
2:复制源系统pfile 到 目标系统,路径重新自定义。略过
3:以spfile启动目标数据库到nomount状态。略过
4:目标系统恢复控制文件:
4.1:目标系统恢复控制文件:
RMAN> restore controlfile from 'c:\db\FULL_COMPRESSD_G8TKC9OO_1_1.BAK'; Starting restore at 14-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=127 device type=DISK channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\CONTROL.CTL
Finished restore at 14-DEC-18
4.2:目标系统 rman 注册备份集路径:
RMAN> alter database mount; database mounted
released channel: ORA_DISK_1 RMAN> catalog start with 'c:\db'; searching for all files that match the pattern c:\db List of Files Unknown to the Database
=====================================
File Name: C:\db\ARCH_GATKC9TQ_1_1.BAK
File Name: C:\db\ARCH_GBTKC9TR_1_1.BAK
File Name: C:\db\ARCH_GGTKEU9G_1_1.BAK
File Name: C:\db\ARCH_GHTKEU9H_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G6TKC9ML_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G7TKC9ML_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G8TKC9OO_1_1.BAK Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done List of Cataloged Files
=======================
File Name: C:\db\ARCH_GATKC9TQ_1_1.BAK
File Name: C:\db\ARCH_GBTKC9TR_1_1.BAK
File Name: C:\db\ARCH_GGTKEU9G_1_1.BAK
File Name: C:\db\ARCH_GHTKEU9H_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G6TKC9ML_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G7TKC9ML_1_1.BAK
File Name: C:\db\FULL_COMPRESSD_G8TKC9OO_1_1.BAK
5:目标系统进行数据文件还原:
RMAN> run{
2> set newname for datafile 1 to "C:\app\Administrator\admin\orcl\oradata\system01.dbf";
3> set newname for datafile 2 to "C:\app\Administrator\admin\orcl\oradata\sysaux01.dbf";
4> set newname for datafile 3 to "C:\app\Administrator\admin\orcl\oradata\undotbs01.dbf";
5> set newname for datafile 4 to "C:\app\Administrator\admin\orcl\oradata\users01.dbf";
6> set newname for datafile 5 to "C:\app\Administrator\admin\orcl\oradata\example01.dbf";
7> set newname for datafile 6 to "C:\app\Administrator\admin\orcl\oradata\FLIGHTRADAR.DBF.dbf";
8> restore database;
9> switch datafile all;
10> } executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 14-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=65 device type=DISK channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to C:\app\Administrator\admin\orcl\oradata\system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to C:\app\Administrator\admin\orcl\oradata\sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to C:\app\Administrator\admin\orcl\oradata\undotbs01.dbf
channel ORA_DISK_1: reading from backup piece D:\DBBACKUP\RMAN\FULL_COMPRESSD_G7TKC9ML_1_1.BAK
channel ORA_DISK_1: errors found reading piece handle=D:\DBBACKUP\RMAN\FULL_COMPRESSD_G7TKC9ML_1_1.BAK
channel ORA_DISK_1: failover to piece handle=C:\DB\FULL_COMPRESSD_G7TKC9ML_1_1.BAK tag=TAG20181209T210004
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to C:\app\Administrator\admin\orcl\oradata\users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to C:\app\Administrator\admin\orcl\oradata\example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to C:\app\Administrator\admin\orcl\oradata\FLIGHTRADAR.DBF.dbf
channel ORA_DISK_1: reading from backup piece C:\DB\FULL_COMPRESSD_G6TKC9ML_1_1.BAK
channel ORA_DISK_1: piece handle=C:\DB\FULL_COMPRESSD_G6TKC9ML_1_1.BAK tag=TAG20181209T210004
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:26
Finished restore at 14-DEC-18 datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=994847838 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\SYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy RECID=9 STAMP=994847838 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\SYSAUX01.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=994847838 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\UNDOTBS01.DBF
datafile 4 switched to datafile copy
input datafile copy RECID=11 STAMP=994847839 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\USERS01.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=12 STAMP=994847839 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\EXAMPLE01.DBF
datafile 6 switched to datafile copy
input datafile copy RECID=13 STAMP=994847840 file name=C:\APP\ADMINISTRATOR\ADMIN\ORCL\ORADATA\FLIGHTRADAR.DBF.DBF
6:还原一个归档日志:
RMAN> run{
2> set until sequence 14040 thread 1;
3> recover database;
4> } executing command: SET until clause Starting recover at 14-DEC-18
using channel ORA_DISK_1 starting media recovery channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=14039
channel ORA_DISK_1: reading from backup piece C:\DB\ARCH_GHTKEU9H_1_1.BAK
channel ORA_DISK_1: piece handle=C:\DB\ARCH_GHTKEU9H_1_1.BAK tag=TAG20181210T210341
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
archived log file name=C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\RDBMS\ARC0000014039_0897388701.0001 thread=1 sequence=14039
media recovery complete, elapsed time: 00:00:03
Finished recover at 14-DEC-18
7:resetlogs打开目标数据库,由于目标数据库版本过高,提示:ORA-00704: 引导程序进程失败
ORA-39700: 必须用 UPGRADE 选项打开数据库
alter database open resetlogs
.........
ORA-39700: 必须用 UPGRADE 选项打开数据库
8:重新连接数据库执行升级:
SQL>startup upgrade;
SQL>@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\catupgrd.sql --重建数据字典视图脚本
执行完毕后数据库自动关闭,再次启动数据库
SQL>startup
SQL>@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlrp.sql --编译无效对象
oracle 11.2.0.1 rman异机恢复 11.2.0.3(windows X64)的更多相关文章
-
Oracle 单实例 迁移到 RAC 实例 -- 使用RMAN 异机恢复
Oracle 官网有关单实例迁移到RAC的一个步骤说明: How to Convert 10g Single-Instance database to 10g RAC using Manual Con ...
-
Linux平台下RMAN异机恢复总结
下面总结.整理一下RMAN异机恢复这方面的知识点,这篇笔记在个人笔记里面躺了几年了,直到最近偶然被翻看到,遂整理.总结一下.如下所示,个人将整个RMAN异机恢复分为准备工作和操作步骤两大部分.当然,准 ...
-
RMAN异机恢复实验---转载
一.RMAN异机恢复实验 2011年3月23日00:44 1.环境介绍: 主机1: 操作系统 REDHAT5.5 IP地址 172.16.1.120 主机名 sigle 数据库版本 10.2.0.4 ...
-
Oracle12c RAC RMAN异机恢复
######################################################## #编辑pfile文件initspdb.ora vi /oracle/app/oracl ...
-
oracle rman异机恢复
Oracle源主机 Oracle目标主机 主机平台 CentOS6.2(final) CentOs6.2(FInal) 主机名 vick rman IP地址 192.168.1.11 192.16 ...
-
NBU Rman异机恢复Oracle
前段时间一个亿级分区表,被分割成历史表和业务表,历史表中保留15天以外的数据,每天都会从业务表中的15天外的数据copy到历史表,并删除业务表15天外的数据,逻辑也很简单,但插入历史表的where 条 ...
-
RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例
测试环境: 操作系统 : Red Hat Enterprise Linux ES release 4 (Nahant Update 4) VMWARE 数据库 : O ...
-
rman异机恢复,全部恢复和增量恢复
1.首先准备工作:hostname 192.168.222.11 ol7.localdomain ol7建立相关目录:mkdir -p /u01/app/oracle/oradata/DB11G/mk ...
-
RMAN异机恢复步骤及故障处理
一.測试机安装OS+Oracle Software.包含配置oracle用户.组和环境变量(略) 二.開始异机恢复 1. 复制源库最新备份集.初始化參数.password文件到測试机 [oracle@ ...
随机推荐
-
轻量级ORM
不知道可能称的上是ORM,其实就是一个DBHelper.看到网上不少人写自己的ORM,但我觉得都不太好. 我这个ORM,学习成本非常低,常用的方法仅有几个,在使用的过程中,你不需要有太多要注意的地方, ...
-
android textview段落开头空格问题
textview中段落开头一般都会空2格排版显示,如果靠编辑空格来解决那就大错特错了,完美的解决方法就是用转义字符"\t",在段首加\t\t就解决啦!
-
三白话经典算法系列 Shell排序实现
山是包插入的精髓排序排序,这种方法,也被称为窄增量排序.因为DL.Shell至1959提出命名. 该方法的基本思想是:先将整个待排元素序列切割成若干个子序列(由相隔某个"增量"的元 ...
-
数据同步DataX
数据同步那些事儿(优化过程分享) 简介 很久之前就想写这篇文章了,主要是介绍一下我做数据同步的过程中遇到的一些有意思的内容,和提升效率的过程. 当前在数据处理的过程中,数据同步如同血液一般充满全过 ...
-
ucos事件邮箱信号量队列详解
Ucos的事件分为时钟,信号量,互斥性信号量,消息队列,以及消息邮箱 首先说信号量 信号量在ucos中的类型定义为OS_EVENT_TYPE_SEM,在任务控制块ecb中,主要是用到的是信号量计数器O ...
-
http服务器开发笔记(一)——先跑起来
做了很多年的web相关开发,从来也没有系统的学习http协议,最近正好工作不怎么忙,准备系统的学习一下. 接下来准备自己写一小型的http服务器来学习,因为现在对JavaScript比较熟悉,所以决定 ...
-
MySQL如何优化
对于全栈而言,数据库技能不可或缺,关系型数据库或者nosql,内存型数据库或者偏磁盘存储的数据库,对象存储的数据库或者图数据库--林林总总,但是第一必备技能还应该是MySQL.从LAMP的兴起,到Ma ...
-
Java基础 -- final关键字
在java的关键字中,static和final是两个我们必须掌握的关键字.不同于其他关键字,他们都有多种用法,而且在一定环境下使用,可以提高程序的运行性能,优化程序的结构.下面我们来了解一下final ...
-
使用二进制安装包的方式单机部署MySQL8.0.13
使用二进制安装包的方式单机部署MySQL8.0.13 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 关于MySQL的介绍我这里就不多做赘述了,如何下载MySQL详情请参考:MySQ ...
-
aaronyang的百度地图API之LBS云与.NET开发 Javascript API 2.0【把数据存到LBS云1/2】
如何让用户点,我们可以获得经纬度,我们就要先了解下它给我们提供的百度地图的事件 主要有两个操作事件的,绑定(addEventListener)和解绑(removeEventListener) 一些事件 ...