rman總結(包含10g rman中的新特性)
正在不斷更新中......
[@more@]1>10grman在backup的時候將當前沒有用的到block跳過,不備份.而在以前的版本中rman只是跳過never been allocated blocks.
2>The CONFIGURE DEVICE TYPE ... PARALLELISM command specifies the number of
automatic channels to allocate for a specified device type. For example, if you configure parallelism to 3 for a device type, then RMAN allocates three channels for the device type when using automatic channels.
3>並行通道的個數應該和物理裝置的match,也就是說如果只有一個磁帶裝置,那麼sbt通道就不能並行,如果只有一個物理disk,那麼disk通道就不能並行.
4>rman在備份archive log的時候如果一個歸檔路徑失敗或者一個log有損壞,那麼rman將去另外的歸檔路徑下尋找可用的archive log,直到備份成功.
5>The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy.
6>如果compatibility>=10.0.0,那麼當Differential Incremental Backups時發現沒有可用的level 0 backup,rman將備份自從檔案建立以來的所有改變過的block,如果compatibility<10.0.0,那麼rman將產生一次level 0備份
7>當自從上一次level 0備份以來資料塊的改變已經大於或者等於總塊數的20%時,就需要再做一次level 0 backup.
以下語句是檢視在備份集中備份塊數超過50%的資料檔案:
SELECT FILE#, INCREMENTAL_LEVEL, COMPLETION_TIME, BLOCKS, DATAFILE_BLOCKS
FROM V$BACKUP_DATAFILE
WHERE INCREMENTAL_LEVEL > 0
AND BLOCKS / DATAFILE_BLOCKS > .5
ORDER BY COMPLETION_TIME;
9>Backup Optimization for SBT Backups with Recovery Window Retention Policy:
當backup optimization enable,那麼當用rman備份檔案到磁帶的時候,rman備份比recovery window 舊的檔案,即使在增量備份策略中自從上次備份以來資料沒有修改過.
10>BACKUP DURATION 4:00 TABLESPACE users:引數duration將備份控制在4個小時之內,如果4個小時沒有備份完成,那麼未完成的backup set將中止並被丟棄,4小時只能完成的其他backup set是可用的,但是如果這個backup 命令是寫在run block裡面的,到達4小時的時候rman將會報錯,這條命令以後的其他命令也將中止,不再繼續.如果用了以下命令(加了引數PARTIAL):
BACKUP DURATION 4:00 PARTIAL TABLESPACE users FILESPERSET 1; 即使這個backup 命令是寫在run block裡面的,到達4小時的時候rman不會報錯,只是出現一個message,顯示哪些檔案還沒有備份,然後這個備份命令中止,而在這個命令後面的包含在run block裡面的其他命令將繼續執行.
注意上面的那條命令: also the use of FILESPERSET 1 in this example. With this option, RMAN puts each file into its own backupset. This way, when a backup is interrupted at the end of
the backup window, only the backup of the file currently being backed up is lost. All backup sets completed during the window are saved, minimizing the lost work due to the end of the backup window.
另:用DURATION可以得到最好的backup performance(在規定的時間內最快的完成備份)以及控制backup在規定的時間內準確完成(可以用來降低備份速度,讓備份準確的在較長的時間段內完成,以降低在備份過程中rman造成的系統,這一點不宜用在tape streaming中),具體的用法如下:
To maximize performance, use the MINIMIZE TIME option with DURATION, as shown in this example:
BACKUP DURATION 4:00 PARTIAL MINIMIZE TIME DATABASE FILESPERSET 1;
To extend the backup to use the full time available, use the MINIMIZE LOAD option,as in this example:
BACKUP DURATION 4:00 PARTIAL MINIMIZE LOAD DATABASE FILESPERSET 1;
RMAN monitors the progress of the running backup, and periodically estimates how long the backup will take to complete at its present rate. If RMAN estimates that the backup will finish before the end of the backup window, it slows down the rate of backup so that the full available duration will be used. This reduces the overhead on the database associated with the backup
10> MAXCORRUPT:在一個檔案中允許的邏輯壞塊和物理壞塊的總和.當壞塊數小於這個引數時rman備份能夠成功,並且記錄這些壞塊的資訊在controlfile和catalog中,並且使用者可以透過訪問v$database_block_corruption檢視來檢視壞塊的資訊.
如果這個檔案中的壞塊總數超過了maxcorrupt的設定值,那麼rman備份將失敗,並且不會記錄壞塊資訊.所以要想檢視壞塊資訊就必須將這個引數設定的足夠大.
11>rman如何備份不一致的block(fractured block),也就是當備份的時候正在被修改的block:
RMAN does not require that you put datafiles into backup mode. During an RMAN backup, a database server session reads each block of the datafile and checks whether each block is fractured by comparing the block header and footer. If a block is fractured, the session re-reads the block. If the same fracture is found, then the block is considered permanently corrupt. If MAXCORRUPT is exceeded, the backup stops.
12>Block Media Recovery with RMAN
these restrictions of block media recovery:
■ You can only perform block media recovery with RMAN. No
interface is available.
■ You can only perform complete recovery of individual blocks.
cannot stop recovery before all redo has been applied to the
■ You can only recover blocks marked media corrupt. The V$DATABASE_CORRUPTION view indicates which blocks in a file were marked most recent BACKUP or BACKUP ... VALIDATE command was
■ You must have a full RMAN backup. Incremental backups are
media recovery. Proxy backups are also not used by block media
full backups and archived log files are used.
■ Block media recovery is able to restore blocks from parent incarnation
and recover the corrupted blocks through a RESETLOGS.
當某個redo log 丟失,Block Media Recovery在讀到這個redo的時候並不是馬上報錯而停止recovery.而是繼續讀後面的redo,因為如果後面的redo裡刪除了這個block上的表,那麼就算丟失的redo裡再怎麼修改這個表上的記錄,在下一個redo裡其實是把這個block標識成了一個新塊.也就是後一個redo覆蓋了前面丟失的redo,所以block recovery可以繼續下去.
12>to add a flash recovery area to an open database:
必須先設定引數DB_RECOVERY_FILE_DEST_SIZE,再設定DB_RECOVERY_FILE_DEST
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10G SCOPE=BOTH SID='*';
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/disk1/flash_recovery_area' SCOPE=BOTH SID='*';
如何Disabling the Flash Recovery Area:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='' SCOPE=BOTH SID="*";
取消Flash Recovery Area以後,在其中儲存的backup等等還可以被rman識別.
13>10g rman新功能:block change tracking
change tracking 記錄塊的變化,用於增量備份時rman不用掃描整個datafile,而是直接讀這個change tracking file.
change tracking 是以level 0 backup為基礎,也就是說level 0 backup還是要掃描整個資料檔案,但是在level 基礎上的增量或者累積備份就可以應用這個特性.
Enabling Change Tracking:
如果設定了DB_CREATE_FILE_DEST,那麼可以直接SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
否則必須指定檔名稱和路徑:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/rman_change_track.f' REUSE;
Disabling Change Tracking:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
可以查詢v$block_change_tracking檢視來確定是否使用了block change tracking
Moving the Change Tracking File:
(1). If necessary, determine the current name of the change tracking file:
SELECT filename
FROM V$BLOCK_CHANGE_TRACKING;
(2). Shut down the database. For example:
SHUTDOWN IMMEDIATE
(3). Using host operating system commands, move the change tracking file to its new location.
(4). Mount the database and move the change tracking file to a location that has more space. For example:
ALTER DATABASE RENAME FILE
'ora_home/dbs/change_trk.f' TO '/new_disk/change_trk.f';
(5). Open the database:
ALTER DATABASE OPEN;
運用以上這樣的步驟可以保留change tracking file裡面原有的內容.但是如果資料庫不允許停機,那麼就得用一下方法,那麼change tracking file裡面原有的內容將會丟失,以後的增量備份都必須掃描datafile,直到做了一次level 0 backup:
(1).ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
(2).ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE 'new_location';
14>影響archivelog路徑的因素:
(1)如果LOG_ARCHIVE_DEST (and, optionally, LOG_ARCHIVE_DUPLEX_DEST) is set,那麼archivelog的路徑只遵循此引數的設定.
(2)如果 DB_RECOVERY_FILE_DEST is specified (that is, if a flash recovery area is
configured) 而且沒有設定 LOG_ARCHIVE_DEST_n, then LOG_ARCHIVE_DEST_10引數隱含設定為 flash recovery area.
(You can override this behavior by explicitly setting LOG_ARCHIVE_DEST_10 to an empty string.)
(3)如果設定了任何一個LOG_ARCHIVE_DEST_n引數,那麼archivelog的路徑只遵循此引數的設定.如果想讓archivelog路徑為配置好的flash recovery area,那麼可以將LOG_ARCHIVE_DEST_n引數配置為LOCATION=USE_DB_RECOVERY_FILE_DEST
(4)如果沒有設定以下任何一個引數:LOG_ARCHIVE_DEST, LOG_ARCHIVE_DEST_n, orDB_RECOVERY_FILE_DEST,
那麼redo logs are archived to a default location that is platform-specific. On Solaris, for example, the default is ?/dbs.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/75730/viewspace-838019/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN命令LIST操作總結
- 12c RMAN新特性之Recover Table
- Oracle 12C新特性-RMAN恢復表Oracle
- [20190718]12c rman新特性 表恢復.txt
- 【RMAN】RMAN的備份保留策略
- RMAN中的通道分配
- 【RMAN】RMAN備份至ASMASM
- RMAN備份相關知識與技能總結
- Oracle 11G RAC複製備庫RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038Oracle
- RMAN-06207和RMAN-06208的處理
- RMAN中的 debug調式命令
- ORACLE rman與RMAN-00054&ORA-09945Oracle
- RMAN(轉)
- 9i和10g上rman全備的一點差別
- RMAN恢復之RMAN-06555處理
- 【RMAN】Oracle rman 常用命令參考Oracle
- 在rman恢復中incarnation的概念
- 【RMAN】在備庫執行rman備份時報錯RMAN-06820 ORA-17629
- RMAN的備份原理
- 【12c】12c RMAN新特性之recover table(表級別恢復)
- Rman_異地、跨平臺、跨版本的恢復總結及案例
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- 資料遷移的時候出現RMAN-03002,RMAN-06026
- RMAN備份中發現壞塊
- RMAN增量恢復
- RMAN備份概述
- oracle手工建庫後rman無法啟用(RMAN-04015)Oracle
- JDK 7 新特性小結(包含例項程式碼)JDK
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 【RMAN】Oracle11g透過rman升級到12cOracle
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- RMAN備份中的通道(CHANNEL)相關 - PARALLELISM 、FILESPERSETParallel
- Java8常用的新特性總結Java
- html5新特性總結HTML
- css3新特性總結CSSS3
- ES6新特性總結
- React 16 新特性使用總結React
- JDK1.8新特性總結JDK
- RMAN 備份相關的概念