ITPub博客

首页 > 数据库 > Oracle > 实验rman恢复普通表空间

实验rman恢复普通表空间

原创 Oracle 作者:orser 时间:2014-05-16 19:01:19 0 删除 编辑

备份表空间
RMAN> backup tablespace EXAMPLE;
Starting backup at 16-MAY-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/orser/example01.dbf
channel ORA_DISK_1: starting piece 1 at 16-MAY-14
channel ORA_DISK_1: finished piece 1 at 16
-MAY-14
piece handle=/u01/app/oracle/diag/bac/BAC_0fp8eo50_1_1.bak tag=TAG20140516T172136 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 16-MAY-14
Starting Control File and SPFILE Autobackup at 16-MAY-14
piece handle=/u01/app/oracle/fast_recovery_area/ORSER/autobackup/2014_05_16/o1_mf_s_847732904_9qcp58b2_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 16-MAY-14


[oracle@orser orser]$ mv example01.dbf example01.dbf.bak


SYS@orser> alter tablespace example offline immediate;
Tablespace altered.


RMAN> restore tablespace example;
Starting restore at 16-MAY-14
using channel ORA_DISK_1
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 00005 to /u01/app/oracle/oradata/orser/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/diag/bac/BAC_0fp8eo50_1_1.bak
channel ORA_DISK_1: piece handle=/u01/app/oracle/diag/bac/BAC_0fp8eo50_1_1.bak tag=TAG20140516T172136
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
Finished restore at 16-MAY-14


RMAN> recover tablespace example;
Starting recover at 16-MAY-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 16-MAY-14


SYS@orser> alter tablespace example online;                  
Tablespace altered.


1、offline表空间
2、restore 备份文件
3、recover 应用redu与archivelog
4、online表空间                      




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29621173/viewspace-1162964/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-04-22

  • 博文量
    6
  • 访问量
    59808