Rman将数据文件恢复到不同的路径
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将数据文件恢复到不同的路径的更多相关文章
- 使用RMAN对数据文件进行恢复
(1)备份数据库 在使用RMAN进行数据库恢复之前,先用RMAN进行全库备份 [oracle@redhat6 ~]$ rman target / Recovery Manager: Release : ...
- mysql通过数据文件恢复数据方法
情况描述:服务器硬盘损坏,服务器换了个新硬盘 ,然后老硬盘插在上面.挂载在这台机器.可以从老硬盘里面拿到数据.只拿到了里面的mysql数据文件夹,把数据文件夹覆盖新的服务器mysql数据文件夹 启动报 ...
- 模拟误删除InnoDB ibdata数据文件恢复
注意:假如误删除 ibdata文件 ,此时千万别把mysqld进程杀死,否则没法挽救. 1.模拟删除ibdata数据文件和重做日志文件: [root@hcdb0 data]# lltotal 4219 ...
- linux下误删数据文件恢复
linux下文件被删除能够用非常多工具进行恢复.比如undelete(适合ext2,ext3).giis(不能恢复安装giis之前的文件).ext3grep(仅限ext3).R-linux(支持ext ...
- oracle 备份恢复篇(四)---rman 单个数据文件
一,环境背景
- 依靠MySQL(frm、MYD、MYI)数据文件恢复
该方法并不是适用于所有MySQL数据库 此次恢复是朋友那边的数据查不了了,请求我支援,出于各种心理原因,我答应试试,于是就有了这篇文章和这次经历,废话不多说.... 物理条件:宿机是Ubuntu16. ...
- RMAN数据库恢复 之归档模式有(无)备份-丢失数据文件的恢复
1.归档模式有备份,丢失数据文件的恢复归档模式有备份,不管丢失什么数据文件,直接在RMAN下RESTOER--->RECOVER--->OPEN即可. RMAN> STARUP MO ...
- RMAN数据库恢复之恢复表空间和数据文件
执行表空间或数据文件恢复时,数据库既可以是MOUNT状态,也可以是OPEN状态.1.恢复表空间在执行恢复之前,如果被操作的表空间未处理OFFLINE状态,必须首先通过ALTER TABLESPACE… ...
- RMAN恢复数据文件
实验之前先备份数据库 RMAN>backup database; 在操作系统中删除数据文件 5 SQL> startup ORACLE 例程已经启动. Total System Globa ...
随机推荐
- ExtJS中xtype一览
基本组件: xtype Class 描述 button Ext.Button 按钮 splitbutton Ext.SplitButton 带下拉菜单的按钮 cycle Ext.CycleButton ...
- 流程控制<二>
上一篇:Numbers.Strings.Lists 笔记<一>下一篇:数据结构-Python3.7<三> 如果需要修改迭代中的数据,建议先赋值一个副本(e.g:序列,切片复制的 ...
- [android] 手机卫士手机实现短信指令获取位置
获取位置 新建一个service的包 新建一个GPSService类继承系统的Service类 清单文件中注册一下 重写onCreate()方法,服务创建的时候回调 重写onDestroy()方法, ...
- elasticsearch6.7 05. Document APIs(4)Delete API
3.Delete API delete API 可以让你删除一个特定id的文档,下面例子删除twitter索引中_doc类型.id为1的文档: DELETE /twitter/_doc/1 返回结果: ...
- 使用Java解析XML
一.解析的对象 <?xml version="1.0" encoding="UTF-8"?> <users> <user id=& ...
- Linux常用基本命令:三剑客命令之-awk动作用法(1)
1,多个动作,怎么写? ghostwu@dev:~/linux/awk$ cat host.txt name ip地址 host1 192.168.1.1 host2 192.177.81.1 hos ...
- spring boot 随手记
1.当加入security 起步依赖后,如果不做任何手动配置的话,默认会跳转到一个登录页面,不管你喜不喜欢,所有的请求都必须登录,用户名和密码是保存在内存中的, 默认用户名是user 密码在控制台里 ...
- matlab练习程序(FAST特征点检测)
算法思想:如果一个像素与它邻域的像素差别较大(过亮或过暗) , 那它更可能是角点. 算法步骤: 1.上图所示,一个以像素p为中心,半径为3的圆上,有16个像素点(p1.p2.....p16). 2.定 ...
- 精通initramfs构建step by step
(一)hello world 一.initramfs是什么 在2.6版本的linux内核中,都包含一个压缩过的cpio格式 的打包文件.当内核启动时,会从这个打包文件中导出文件到内核的rootfs ...
- centos 7.2 64位 docker安装lamp环境
1. 删除docker可能有的早期版本 yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docke ...