rman中RETENTION POLICY和BACKUP OPTIMIZATION的制約關係!

warehouse發表於2011-03-30

更詳細的內容可以參考doc:

本文只針對RETENTION POLICY和BACKUP OPTIMIZATION以及結合043中的一道題做一個簡單的說明,這道題在群內問起的人很多,確實不是很好理解。

[@more@]

先看一下doc吧:

If backup optimization is enabled, and if a recovery window retention policy is in
effect, then when performing SBT backups RMAN always backs up datafiles whose
most recent backup is older than the recovery window. For example, assume that:
■ Today is February 21.
■ The recovery window is 7 days.
■ The most recent backup of tablespace tools to tape is January 3.
■ Tablespace tools is read-only.
On February 21, when you issue a command to back up tablespace tools to tape,
RMAN backs it up even though it did not change after the January 3 backup (because
it is read-only). RMAN makes the backup because no backup of the tablespace exists
within the 7-day recovery window.
This behavior allows the media manager to expire old tapes. Otherwise, the media
manager would be forced to keep the January 3 backup of tablespace tools
indefinitely. By making a more recent backup of tablespace tools on February 21,
RMAN allows the media manager to expire the tape containing the obsolete January 3
backup.

--===========================================

題目如下:

You set the recovery window to seven days and the backup optimization to ON using the
CONFIGURE command of Recovery Manager (RMAN). The most recent backup of the TOOLS
tablespace to disk was taken on January 3. The TOOLS tablespace is read-only.
On February 21, when you execute a command to back up all the tablespaces to disk, you find
that RMAN backs up the TOOLS tablespace also, even though the contents of the tablespace
have not changed after the backup on January 3.
Because there are no changes made to the TOOLS tablespace, you decide that the tablespace
should not be backed up by RMAN. What can you do to skip backing up the TOOLS tablespace
without changing the current backup optimization setting?
A. configure a default device for RMAN backups
B. temporarily disable the retention policy for RMAN backups
C. configure automatic channel allocation for RMAN backups
D. use the CONFIGURE command to reconfigure the recovery window to 60 days
--==============================

答案是B沒有問題,因為儲存策略設定的是7天,1月3號做的備份其實已經過期了,所以在2月21號做備份的時候又備了只讀表空間TOOLS,儘管TOOLS的內容沒有任何變化。如果1月3號的備份不過期的話,那麼此時BACKUP OPTIMIZATION ON會發揮作用,就不會在2月21號或者之後的備份中再備份TOOLS表空間,所以說RETENTION POLICY會優先於BACKUP OPTIMIZATION 發揮作用,其實答案D中提到的透過 reconfigure the recovery window to 60 days也可以達到不備份TOOLS表空間的目的,因為修改儲存策略為60天之後,1月3號的備份就不過期了,此時BACKUP OPTIMIZATION ON發揮作用也會skip對TOOLS的備份,所以此題不是很嚴密。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1047945/,如需轉載,請註明出處,否則將追究法律責任。

相關文章