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 ...
随机推荐
- vue 前台传后台
var the = this:let url = "/api/Purchase_Enter/CancelEnter"; let params = { Enter_Id: Enter ...
- [转]group by 后使用 rollup 子句总结
group by 后使用 rollup 子句总结 一.如何理解group by 后带 rollup 子句所产生的效果 group by 后带 rollup 子句的功能可以理解为:先按一定的规则产生多种 ...
- Hive 表类型简述
Hive 表类型简述 表类型一.管理表或内部表Table Type: MANAGED_TABLE example: create table Inner(id int,name string, ...
- 【Spring】19、spring配置数据源的4种方式
不管采用何种持久化技术,都需要定义数据源.Spring中提供了4种不同形式的数据源配置方式: spring自带的数据源(DriverManagerDataSource),DBCP数据源,C3P0数据源 ...
- 一次关于()=>({})的使用
今天遇到了一个问题,值得一记 首先在我看项目代码时发现了一个问题 有一个JS的export如下 大家可以注意一下config 这里为什么要如此写法呢? 首先这里用的时ES6的箭头函数 ()=>{ ...
- 【代码笔记】Web-JavaScript-JavaScript 变量
一,效果图. 二,代码. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...
- C++ UTF8 UrlEncode(宽字符)
为了支持C++ UrlEncode之后的字符串能够被C#所识别(windows phone 下C#只能支持UTF8与 Unicode). 所谓的 UTF8 UrlEncode 也只是宽字符串 UrlE ...
- linux编写.sh脚本并赋权限
今日打包编译项目时,发现缺少一个git pull更新项目的脚本,所以在linux编写了一个gitpull.sh脚本,能够实现更新项目的需求. 1.首先vi gitpull.sh或者使用vim编辑器. ...
- MVP架构分析与搭建
一个项目的核心就是架构 1.什么是MVP:MVP是一种项目架构设计模式. 其实MVP的本质就是将view和model完全隔离出来,通过Presenter (主持人) 统一调度管理.
- 利用搜狐新闻语料库训练100维的word2vec——使用python中的gensim模块
关于word2vec的原理知识参考文章https://www.cnblogs.com/Micang/p/10235783.html 语料数据来自搜狐新闻2012年6月—7月期间国内,国际,体育,社会, ...