您好,登錄后才能下訂單哦!
本篇文章為大家展示了怎么理解RMAN backup database plus archivelog delete all input命令,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
RMAN> run {
2> backup as compressed backupset incremental level 1 database plus archivelog delete all input;
3> }//RMAN備份腳本
Starting backup at 28-APR-10
#切換在線日志(sql 'alter system archive log current';)
current log archived//發生日志切換
#備份之前所有的歸檔日志
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=33 recid=6 stamp=717527999 //這是剛剛歸檔的日志
channel ORA_DISK_1: starting piece 1 at 28-APR-10
channel ORA_DISK_1: finished piece 1 at 28-APR-10
piece handle=/u01/app/oracle/flash_recovery_area/YTHDB/backupset/2010_04_28/o1_mf_annnn_TAG20100428T172000_5xhvxkcy_.bkp tag=TAG20100428T172000 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)//刪除輸入的歸檔日志
archive log filename=/u01/app/oracle/flash_recovery_area/YTHDB/archivelog/2010_04_28/o1_mf_1_33_5xhvxhjl_.arc recid=6 stamp=717527999
Finished backup at 28-APR-10
#備份數據文件
Starting backup at 28-APR-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00005 name=/dev/rdcdb_data01
input datafile fno=00006 name=/dev/rdcdb_data02
input datafile fno=00007 name=/dev/rdcdb_data03
input datafile fno=00008 name=/dev/rdcdb_data04
input datafile fno=00009 name=/dev/rdcdb_data05
input datafile fno=00010 name=/dev/rdcdb_data06
input datafile fno=00011 name=/dev/rdcdb_data07
input datafile fno=00012 name=/dev/rdcdb_data08
input datafile fno=00013 name=/dev/rdcdb_data09
input datafile fno=00014 name=/dev/rdcdb_data10
input datafile fno=00015 name=/dev/rdcdb_data11
input datafile fno=00016 name=/dev/rdcdb_data12
input datafile fno=00017 name=/dev/rdcdb_data13
input datafile fno=00018 name=/dev/rdcdb_data14
input datafile fno=00019 name=/dev/rdcdb_data15
input datafile fno=00020 name=/dev/rdcdb_data16
input datafile fno=00021 name=/dev/rdcdb_data17
input datafile fno=00022 name=/dev/rdcdb_data18
input datafile fno=00001 name=/dev/rdcdb_system01
input datafile fno=00023 name=/dev/rdcdb_data19
input datafile fno=00003 name=/dev/rdcdb_sysaux01
input datafile fno=00002 name=/dev/rdcdb_undotbs01
input datafile fno=00004 name=/dev/rdcdb_user
channel ORA_DISK_1: starting piece 1 at 28-APR-10
channel ORA_DISK_1: finished piece 1 at 28-APR-10
piece handle=/u01/app/oracle/flash_recovery_area/YTHDB/backupset/2010_04_28/o1_mf_nnnd1_TAG20100428T172003_5xhvxqn1_.bkp tag=TAG20100428T172003 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_1: starting compressed incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
#備份控制文件和SPFILE(AUTOBACKUP OFF)
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 28-APR-10
channel ORA_DISK_1: finished piece 1 at 28-APR-10
piece handle=/u01/app/oracle/flash_recovery_area/YTHDB/backupset/2010_04_28/o1_mf_ncsn1_TAG20100428T172003_5xhvxv6b_.bkp tag=TAG20100428T172003 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 28-APR-10
Starting backup at 28-APR-10
#再次切換在線日志(sql 'alter system archive log current';)
current log archived//發生日志切換
#備份執行備份命令期間產生的歸檔日志
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=34 recid=7 stamp=717528012//這是剛剛歸檔的日志
channel ORA_DISK_1: starting piece 1 at 28-APR-10
channel ORA_DISK_1: finished piece 1 at 28-APR-10
piece handle=/u01/app/oracle/flash_recovery_area/YTHDB/backupset/2010_04_28/o1_mf_annnn_TAG20100428T172012_5xhvxy7k_.bkp tag=TAG20100428T172012 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)//刪除輸入的歸檔日志
archive log filename=/u01/app/oracle/flash_recovery_area/YTHDB/archivelog/2010_04_28/o1_mf_1_34_5xhvxwgz_.arc recid=7 stamp=717528012
Finished backup at 28-APR-10
命令中的關鍵字all個人理解有2層含義:
1.表示當前歸檔日志之前的所有日志。所以我們在備份執行要先加入一句crosscheck archivelog all;以免在比對老的歸檔時發現沒有而報錯。
2.如果有多個歸檔的目的地,表示所有的歸檔目的地,在執行刪除歸檔日志的時候才會在所有的目的地上全部刪除。
上述內容就是怎么理解RMAN backup database plus archivelog delete all input命令,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。