ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【实验】从RMAN备份中恢复controlfile控制文件

【实验】从RMAN备份中恢复controlfile控制文件

原创 Linux操作系统 作者:secooler 时间:2009-03-13 16:52:33 0 删除 编辑
1.数据库open状态,有自动备份的信息,恢复控制文件
RMAN> restore controlfile to '/home/oracle/control01.ctl' from autobackup;

Starting restore at 14-MAR-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=544 devtype=DISK

recovery area destination: /oracle/u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: ORA10G
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oracle/u01/app/oracle/flash_recovery_area/ORA10G/autobackup/2009_03_14/o1_mf_s_681463726_4vov1jf8_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
Finished restore at 14-MAR-09

RMAN> exit


Recovery Manager complete.
ora10g@linux5 /home/oracle$ ls -l control*
-rw-r----- 1 oracle oinstall 7061504 Mar 14 08:10 control01.ctl

2.无法mount,在nomount状态下知道备份文件的名称,恢复控制文件
RMAN> restore controlfile to '/home/oracle/control01.ctl' from '/oracle/u01/app/oracle/flash_recovery_area/ORA10G/autobackup/2009_03_14/o1_mf_s_681463726_4vov1jf8_.bkp';

Starting restore at 14-MAR-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=526 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 14-MAR-09
注:此种情况在10g中亦可以通过自动备份的信息进行恢复(from autobackup),在9i环境下通过自动备份的信息进行恢复会报错,只能使用这种方法进行恢复

secooler
09.03.13

-- The End --

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

请登录后发表评论 登录
全部评论
Oracle ACE 总监,阿里云MVP,北京大学理学硕士,恩墨学院创始人,教育专家,中国区 Cloudera 首位官方授权大数据讲师,金牌培训专家,BDA大数据联盟创始人,OCM联盟创始人,ACCUG创始人、ACOUG核心专家,Blogger。

注册时间:2008-03-16

  • 博文量
    797
  • 访问量
    8093346