Managing multiple archive log destinations with RMAN (Doc ID 443814.1)
In this Document
Goal |
Solution |
DELETE INPUT |
Backup and Delete from a Specified Archive Destination |
The FRA and DELETE INPUT |
Where do the restored archivelogs go? |
Restoring archivelog to FRA in ASM |
References |
Applies to:
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]Information in this document applies to any platform.
***Checked for relevance on 08-Jan-2014***
Goal
Explain how multiple archive destinations are handled during an RMAN backup and restore process
Solution
DELETE INPUT
DELETE INPUT will remove archivelogs from the first destination. It will also remove archivelogs from the second destination that was PREVIOUSLY backed up.
For example:
Backup #1
- Backup archivelogs older than seven days from destination #1, and remove these files
- Do not backup or remove any archivelogs in destination #2 has all files
Backup #2
- For destination #1, backup archivelogs older than seven days and remove these files
- For destination #2, backup archivelogs that satisfied backup criteria #1 (more than 14 days old) and remove them
Whereas a DELETE ALL INPUT will backup from one destination and delete both copies of the archivelog.
Backup and Delete from a Specified Archive Destination
If you'd like to only backup and remove from a single archive destination, use the LIKE clause:
eg:
until time 'sysdate -7'
like '/u04/oracle/admin/TEST/arch/%'
delete input;
The above will only backup and delete from the LIKE destination
If archive logs are written up to multiple destinations, and if the required retention policy is required to be different for different destinations, then the following can be done:
backup archivelog all;
delete archivelog until time 'sysdate -1' like '/am3/oradata/arch/%';
delete archivelog until time 'sysdate -5' like '/am3/oradata/arch1/AM3P2/%';
}
The FRA and DELETE INPUT
RMAN will backup and remove the archivelogs in numerical order from _dest_1 to dest_10. However,
if one of the archive destinations is an FRA, RMAN will always backup and remove from the FRA
first, and then work on the numerical order of the log_archive_dest_x
eg.
If the following parameters were set:
- log_archive_dest_1='location=/u002/oraarch/ORA1020'
- log_archive_dest_2='LOCATION=USE_DB_RECOVERY_FILE_DEST'
- log_archive_dest_3='location=/u002/oraarch3/ORA1020'
Oracle will backup and remove from the FRA, folllowed by archivelogs in log_archive_dest_1.
Finally, logs in log_archive_dest_3 will be removed.
Where do the restored archivelogs go?
During the restore process RMAN will check all archive destinations to make sure that the archivelog requested does not already exist. If the archivelog already exist in one of the destinations RMAN will not restore the file. If the archivelog does not exist in any of the destinations RMAN will restore it to the FRA if it exists. Otherwise it will restore it to the highest archive destination defined.
Restoring archivelog to FRA in ASM
When using the FRA and ASM, the archivelog will be restored to the current directory, rather than the time at which it was generated. Even if using the SET ARCHIVELOG DESTINATION, an alias will be created to the current directory.
For example, on the 16 Aug 2010, when restoring the 13 Aug archivelogs:
allocate channel c1 type 'sbt_tape';
set archivelog destination to '+SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_13';
restore archivelog
from time "to_date('13/08/2010-00:00:00','dd/mm/yyyy-hh24:mi:ss')"
until time "to_date('14/08/2010-00:00:00','dd/mm/yyyy-hh24:mi:ss')";
}
ASMCMD> ls -ltr
Type Redund Striped Time Sys Name
N 1_94528_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94528.5341.727224533
N 1_94529_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94529.3425.727224661
N 1_94530_708660567.dbf => +SHARED_FRA_DG01/P132/ARCHIVELOG/2010_08_16/thread_1_seq_94530.5644.727224779
References
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1138329/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN 11g Import catalog fails RMAN-6429 (Doc ID 457392.1)ImportAI
- 【RMAN】Archive Log Not Deleted As It Is Still Needed Rman-08137Hivedelete
- How to config (no)archivelog mode and manage archive log files by RMANHive
- RMAN RAC Archivelog Restore Fails with RMAN-20242 (Doc ID 180169.1)HiveRESTAI
- RMAN : Consistent Backup, Restore and Recovery using RMAN (Doc ID 162855.1)REST
- Oracle10G RMAN Database Duplication (Doc ID 259694.1)OracleDatabase
- RMAN Backup Shell Script Example (Doc ID 137181.1)
- 11g feature: Flashback Data Archive Guide. (Doc ID 470199.1)HiveGUIIDE
- Managing Startups: Best Blog Posts
- Rman Backup Failed With Error Rman-00600 [8201] (Doc ID 412786.1)AIError
- How to Duplicate a Database in NOARCHIVELOG mode (Doc ID 275480.1)DatabaseHive
- log_archive_dest與log_archive_dest_n區別Hive
- Performing duplicate database with ASM/OMF/RMAN (Doc ID 340848.1)ORMDatabaseASM
- RMAN Restore Performance from Tape is Very Poor (Doc ID 850988.1)RESTORM
- Can Tapes Be Used For RMAN Convert Database (Doc ID 563816.1)Database
- RMAN10g: backup copy of database (Doc ID 266980.1)Database
- Checking for Oracle archive log corruption [ID 1268590.1]OracleHive
- Logstash Multiple Pipelines
- 【轉】詳解log_archive_dest與log_archive_dest_n區別Hive
- 關於 log_archive_dest與log_archive_dest_n a的區別Hive
- Rman Enhancements In Oracle 11g. (Doc ID 1115423.1)Oracle
- Open Resetlogs After Restore Hangs (Doc ID 1455666.1)REST
- SQLNET.ALLOWED_LOGON_VERSION (Doc ID 755605.1)SQLGo
- rman 刪除v$archive_log檢視裡的記錄(Removing entries in v$archived_log)HiveREM
- Windows 下備份 archive logWindowsHive
- archive log 歸檔日誌Hive
- alter system archive log current noswitch!!Hive
- alter system archive log current / all / switch logfileHive
- Archive Log模式下Redo Log、Check Point和Switch LogHive模式
- logminer工具對redo log或archive log的挖掘Hive
- DataGridView with multiple tableView
- android tv-Managing User InteractionAndroid
- ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DESTHive
- standby_archive_dest和log_archive_dest_n區別Hive
- 關於RMAN-08137: WARNING: archive log not deleted as it is still needed問題的分析Hivedelete
- Hide RMAN Passwords when Connecting to a Target Database (Doc ID 183377.1)IDEDatabase
- 使用LOGMNR工具分析Oracle Redo Log和Archive Log教程Oracle RedoHive
- RMAN backup validate database on databases in noarchivelog modeDatabaseHive