RMAN> startup nomount
 
connected to target database (not started)
Oracle instance started
 
Total System Global Area     289406976 bytes
 
Fixed Size                     1219016 bytes
Variable Size                 79693368 bytes
Database Buffers             205520896 bytes
Redo Buffers                   2973696 bytes
 
RMAN> restore controlfile from autobackup ;
 
Starting restore at 20-JAN-13
using channel ORA_DISK_1
 
recovery area destination: /u01/oracle/flash_recovery_area
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /u01/oracle/flash_recovery_area/ORCL/autobackup/2013_01_20/o1_mf_s_805243193_8hr0ftx5_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/u01/oracle/oradata/orcl/control01.ctl
output filename=/u01/oracle/oradata/orcl/control02.ctl
output filename=/u01/oracle/oradata/orcl/control03.ctl
Finished restore at 20-JAN-13
 
 
RMAN> alter database mount ;
 
database mounted
released channel: ORA_DISK_1
 
 
 
 
RMAN> run{
2> set newname for datafile  1  to    '/home/oracle/system01.dbf' ;
3> set newname for datafile  2  to    '/home/oracle/undotbs01.dbf';
4> set newname for datafile  3  to    '/home/oracle/sysaux01.dbf';
5> set newname for datafile  4  to    '/home/oracle/users01.dbf';
6> set newname for datafile  5  to    '/home/oracle/example01.dbf';
7> restore database ;
8> switch datafile all ;
9> recover database ;
10> }
 
executing command: SET NEWNAME
using target database control file instead of recovery catalog
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
executing command: SET NEWNAME
 
Starting restore at 20-JAN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
 
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /home/oracle/system01.dbf
restoring datafile 00002 to /home/oracle/undotbs01.dbf
restoring datafile 00003 to /home/oracle/sysaux01.dbf
restoring datafile 00004 to /home/oracle/users01.dbf
restoring datafile 00005 to /home/oracle/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/oracle/flash_recovery_area/ORCL/backupset/2013_01_20/o1_mf_nnndf_TAG20130120T223858_8hr0d2lr_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/oracle/flash_recovery_area/ORCL/backupset/2013_01_20/o1_mf_nnndf_TAG20130120T223858_8hr0d2lr_.bkp tag=TAG20130120T223858
channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
Finished restore at 20-JAN-13
 
datafile 1 switched to datafile copy
input datafile copy recid=17 stamp=805245722 filename=/home/oracle/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=18 stamp=805245722 filename=/home/oracle/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=19 stamp=805245722 filename=/home/oracle/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=20 stamp=805245722 filename=/home/oracle/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=21 stamp=805245722 filename=/home/oracle/example01.dbf
 
Starting recover at 20-JAN-13
using channel ORA_DISK_1
 
starting media recovery
 
archive log thread 1 sequence 6 is already on disk as file /u01/oracle/oradata/orcl/redo02.log
archive log filename=/u01/oracle/oradata/orcl/redo02.log thread=1 sequence=6
media recovery complete, elapsed time: 00:00:04
Finished recover at 20-JAN-13
 
 
RMAN> alter database open resetlogs ;
 
database opened

Rman将数据文件恢复到不同的路径的更多相关文章

  1. 使用RMAN对数据文件进行恢复

    (1)备份数据库 在使用RMAN进行数据库恢复之前,先用RMAN进行全库备份 [oracle@redhat6 ~]$ rman target / Recovery Manager: Release : ...

  2. mysql通过数据文件恢复数据方法

    情况描述:服务器硬盘损坏,服务器换了个新硬盘 ,然后老硬盘插在上面.挂载在这台机器.可以从老硬盘里面拿到数据.只拿到了里面的mysql数据文件夹,把数据文件夹覆盖新的服务器mysql数据文件夹 启动报 ...

  3. 模拟误删除InnoDB ibdata数据文件恢复

    注意:假如误删除 ibdata文件 ,此时千万别把mysqld进程杀死,否则没法挽救. 1.模拟删除ibdata数据文件和重做日志文件: [root@hcdb0 data]# lltotal 4219 ...

  4. linux下误删数据文件恢复

    linux下文件被删除能够用非常多工具进行恢复.比如undelete(适合ext2,ext3).giis(不能恢复安装giis之前的文件).ext3grep(仅限ext3).R-linux(支持ext ...

  5. oracle 备份恢复篇(四)---rman 单个数据文件

    一,环境背景

  6. 依靠MySQL(frm、MYD、MYI)数据文件恢复

    该方法并不是适用于所有MySQL数据库 此次恢复是朋友那边的数据查不了了,请求我支援,出于各种心理原因,我答应试试,于是就有了这篇文章和这次经历,废话不多说.... 物理条件:宿机是Ubuntu16. ...

  7. RMAN数据库恢复 之归档模式有(无)备份-丢失数据文件的恢复

    1.归档模式有备份,丢失数据文件的恢复归档模式有备份,不管丢失什么数据文件,直接在RMAN下RESTOER--->RECOVER--->OPEN即可. RMAN> STARUP MO ...

  8. RMAN数据库恢复之恢复表空间和数据文件

    执行表空间或数据文件恢复时,数据库既可以是MOUNT状态,也可以是OPEN状态.1.恢复表空间在执行恢复之前,如果被操作的表空间未处理OFFLINE状态,必须首先通过ALTER TABLESPACE… ...

  9. RMAN恢复数据文件

    实验之前先备份数据库 RMAN>backup database; 在操作系统中删除数据文件 5 SQL> startup ORACLE 例程已经启动. Total System Globa ...

随机推荐

  1. 关于MVC的感悟

    代码一定要静下心来自己琢磨感悟,才会发现一些细节,只注重实现的结果是要不得的. 室友有些奋进,我得努力啊!

  2. .net导出excle无需任何插件,直接通过一个tablehtml实现

    项目背景: 项目需要导出样式复杂的excl表格,主要是一些样式布局比较复杂 技术分析: 目前比较通用的实现方式有 1.借助微软的excle插件 2.通过NPOI插件实现 3.直接导出一个html(ta ...

  3. Modular Inverse(zoj3609+欧几里德)

    Modular Inverse Time Limit: 2 Seconds      Memory Limit: 65536 KB The modular modular multiplicative ...

  4. border-sizing属性详解和应用

    box-sizing用于更改用于计算元素宽度和高度的默认的 CSS 盒子模型.它有content-box.border-box和inherit三种取值.inherit指的是从父元素继承box-sizi ...

  5. javascript:jQuery tablesorter 2.0

    https://mottie.github.io/tablesorter/docs/index.html 1.GridView <%@ Page Language="C#" ...

  6. js+bootstrap实现分页页码

    制作page.jsp,在其他页码引入,只需把最外层的form标签的id设置为myForm: 其中 totalPages:共有多少页:totalElements:共有有多少条记录:currentPage ...

  7. ArcGIS JavaScript API动态图层

      矢量动态图层     <!DOCTYPE HTML> <html>   <head> <meta http-equiv="Content-Typ ...

  8. JMeter 配置元件之计数器Counter

    配置元件之计数器Counter   by:授客 QQ:1033553122 测试环境 apache-jmeter-2.13 1.   计数器简介 允许用户创建一个在线程组范围之内都可以被引用的计数器. ...

  9. ScrollView与ListView的事件冲突

    布局文件 当ListView嵌套在ScrollView中时,会发生冲突,导致ListView控件的拉动效果消失‘ 解决办法: 重写ListView的onTouchEvent(),并在返回前调用getP ...

  10. ViewPager防止Fragment销毁以及取消Fragment的预加载

    存在的问题 1. 默认情况下,ViewPager会根据setOffscreenPageLimit()方法设置的大小,自动预加载2. 还是根据setOffscreenPageLimit()方法设置的大小 ...