| 论坛注册| 加入收藏 | 设为首页| RSS
Google
您当前的位置:首页 > Linux频道 > Linux开发区 > 数据库开发

从自动备份中恢复控制文件和SPFILE文件

时间:2007-11-22 09:39:51  来源:Linux联盟收集整理  作者:
 

当我们启用自动控制文件备份功能后,如果数据库发生重要改变或备份完成时,它会自动进行控制文件备份,同时它也会备份SPFILE文件。 CCTLinux联盟

有关什么时间来进行自动备份,请参考Oracle的以下说明: CCTLinux联盟

When RMAN Performs Control File Autobackups

By default, control file autobackups are turned off, and no control file 
autobackups are performed. If CONFIGURE CONTROLFILE AUTOBACKUP is ON, 
then RMAN automatically backs up the control file and the current server 
parameter file (if used to start up the database) in one of two circumstances:
 

when a successful backup must be recorded in the RMAN repository, 
and when a structural change to the database affects the contents of the 
control file which therefore must be backed up.

下面的这个例子主要用来说明如何通过自动备份恢复控制文件和SPFILE文件。 CCTLinux联盟

◆查询当前拥有的备份 CCTLinux联盟

$ rman target /

Recovery Manager: Release 10.1.0.2.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle.  All rights reserved.

connected to target database: EYGLE (DBID=1337390772)

RMAN> list backup of controlfile;

using target database controlfile instead of recovery catalog

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
26      Full    3M         DISK        00:00:02     29-MAR-05      
        BP Key: 26   Status: AVAILABLE  Compressed: NO  
Tag: TAG20050329T171049
        Piece Name: /data5/flash_recovery_area/EYGLE/autobackup
/2005_03_29/o1_mf_s_554231449_14l6wv59_.bkp
  Controlfile Included: Ckp SCN: 10643029     Ckp time: 29-MAR-05

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
27      Full    3M         DISK        00:00:02     29-MAR-05      
        BP Key: 27   Status: AVAILABLE  Compressed: NO  
Tag: TAG20050329T222158
        Piece Name: /data5/flash_recovery_area/EYGLE/autobackup
/2005_03_29/o1_mf_s_554250117_14ls48bd_.bkp
Controlfile Included: Ckp SCN: 10652118     
Ckp time: 29-MAR-05

◆从备份中恢复控制文件 CCTLinux联盟

RMAN> restore controlfile to '/tmp/control.ctl' from 
'/data5/flash_recovery_area/EYGLE/autobackup/2005_03_29CCTLinux联盟
/o1_mf_s_554250117_14ls48bd_.bkp'; Starting restore at 30-MAR-05 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=134 devtype=DISK channel ORA_DISK_1: restoring controlfile channel ORA_DISK_1: restore complete Finished restore at 30-MAR-05

◆从备份中恢复SPFILE文件 CCTLinux联盟

RMAN> restore spfile to '/tmp/spfileeygle.ora' from 
'/data5/flash_recovery_area/EYGLE/autobackup/2005_03_29CCTLinux联盟
/o1_mf_s_554250117_14ls48bd_.bkp'; Starting restore at 30-MAR-05 using channel ORA_DISK_1 channel ORA_DISK_1: autobackup found: /data5/flash_recovery_area/EYGLE/autobackup/2005_03_29CCTLinux联盟
/o1_mf_s_554250117_14ls48bd_.bkp channel ORA_DISK_1: SPFILE restore from autobackup complete Finished restore at 30-MAR-05 RMAN>
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目更新
栏目热门