eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 通过Oracle10g的flashback transaction query新特性进行事务撤销 | Blog首页 | 使用RMAN进行基于表空间的恢复 »

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

启用了自动控制文件备份功能之后,在数据库发生重要改变或备份完成之后,会自动进行控制文件备份,同时备份SPFILE文件。
关于何时进行自动备份,Oracle如下说明:
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文件。
1.查询当前拥有的备份

$ 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

2.从备份中恢复控制文件

RMAN> restore controlfile to '/tmp/control.ctl' from '/data5/flash_recovery_area/EYGLE/autobackup/2005_03_29/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

3.从备份中恢复SPFILE文件

RMAN> restore spfile to '/tmp/spfileeygle.ora' from '/data5/flash_recovery_area/EYGLE/autobackup/2005_03_29/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_29/o1_mf_s_554250117_14ls48bd_.bkp channel ORA_DISK_1: SPFILE restore from autobackup complete Finished restore at 30-MAR-05 RMAN>


历史上的今天...
    >> 2012-03-30文章:
    >> 2011-03-30文章:
    >> 2009-03-30文章:
           关于ocssd进程的三言两语
    >> 2008-03-30文章:
           resize datafile 与 checkpoint
    >> 2006-03-30文章:
           广告: 招聘SQL SERVER DBA

无觅

By eygle on 2005-03-30 22:51 | Comments (0) | Backup&Recovery | 232 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com