原創(chuàng)|其它|編輯:郝浩|2009-08-24 11:40:48.000|閱讀 495 次
概述:當我們啟用自動控制文件備份功能后,如果數(shù)據(jù)庫發(fā)生重要改變或備份完成時,它會自動進行控制文件備份,同時它也會備份SPFILE文件。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
當我們啟用自動控制文件備份功能后,如果數(shù)據(jù)庫發(fā)生重要改變或備份完成時,它會自動進行控制文件備份,同時它也會備份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文件。
◆查詢當前擁有的備份
$ 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
◆從備份中恢復控制文件
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
◆從備份中恢復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>
本站文章除注明轉載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:IT專家網(wǎng)論壇