誤刪歸檔日誌除導致備份歸檔日誌失敗
背景:
測試環境的歸檔日誌無意被刪除了,導致備份歸檔日誌的時候報RMAN-06059的錯誤,詳細的日誌:
RMAN> connect target * 2> 3> RUN { 4> ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE'; 5> ALLOCATE CHANNEL CH2 TYPE 'SBT_TAPE'; 6> SEND DEVICE TYPE 'SBT_TAPE' 'NSR_ENV=(NSR_CLIENT=joeonepiq)'; 7> BACKUP ARCHIVELOG ALL filesperset 1 format 'PIQ_ARCH_%s_%p_%t' delete input; 8> BACKUP format 'PIQ_CONTROL_%s_%p_%T' current controlfile; 9> RELEASE CHANNEL CH1; 10> RELEASE CHANNEL CH2; 11> } 12> connected to target database: PIQ (DBID=1615856458) using target database control file instead of recovery catalog
allocated channel: CH1 channel CH1: SID=88 device type=SBT_TAPE channel CH1: NMDA Oracle v1.5.0 sent command to channel: CH1
allocated channel: CH2 channel CH2: SID=169 device type=SBT_TAPE channel CH2: NMDA Oracle v1.5.0 sent command to channel: CH2
sent command to channel: CH1 sent command to channel: CH2
Starting backup at 23-JUN-14 released channel: CH1 released channel: CH2 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 06/23/2014 08:47:30 RMAN-06059: expected archived log not found, loss of archived log compromises recoverability ORA-19625: error identifying file /oracle/PIQ/oraarch/PIQarch1_32074_791218442.dbf ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: A file or directory in the path name does not exist. Additional information: 3 |
解決方法:
RMAN>crosscheck archivelog all;
進行歸檔日誌的校驗;
RMAN>delete expired archivelog all;
刪除失效的歸檔日誌;
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1 released channel: ORA_DISK_2 released channel: ORA_DISK_3 released channel: ORA_DISK_4 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=88 device type=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: SID=169 device type=DISK allocated channel: ORA_DISK_3 channel ORA_DISK_3: SID=244 device type=DISK allocated channel: ORA_DISK_4 channel ORA_DISK_4: SID=330 device type=DISK List of Archived Log Copies for database with db_unique_name PIQ ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - --------- 31915 1 32074 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32074_791218442.dbf
31916 1 32075 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32075_791218442.dbf
31917 1 32076 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32076_791218442.dbf
31918 1 32077 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32077_791218442.dbf
31919 1 32078 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32078_791218442.dbf
31920 1 32079 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32079_791218442.dbf
31921 1 32080 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32080_791218442.dbf
31922 1 32081 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32081_791218442.dbf
31923 1 32082 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32082_791218442.dbf
31924 1 32083 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32083_791218442.dbf
31925 1 32084 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32084_791218442.dbf
31926 1 32085 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32085_791218442.dbf
31927 1 32086 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32086_791218442.dbf
31928 1 32087 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32087_791218442.dbf
31929 1 32088 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32088_791218442.dbf
31930 1 32089 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32089_791218442.dbf
31931 1 32090 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32090_791218442.dbf
31932 1 32091 X 24-APR-14 Name: /oracle/PIQ/oraarch/PIQarch1_32091_791218442.dbf Do you really want to delete the above objects (enter YES or NO)? YES deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32074_791218442.dbf RECID=31915 STAMP=845742679 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32075_791218442.dbf RECID=31916 STAMP=845742682 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32076_791218442.dbf RECID=31917 STAMP=845742686 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32077_791218442.dbf RECID=31918 STAMP=845742707 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32078_791218442.dbf RECID=31919 STAMP=845742710 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32079_791218442.dbf RECID=31920 STAMP=845742713 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32080_791218442.dbf RECID=31921 STAMP=845742719 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32081_791218442.dbf RECID=31922 STAMP=845742793 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32082_791218442.dbf RECID=31923 STAMP=845742796 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32083_791218442.dbf RECID=31924 STAMP=845742800 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32084_791218442.dbf RECID=31925 STAMP=845742952 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32085_791218442.dbf RECID=31926 STAMP=845742958 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32086_791218442.dbf RECID=31927 STAMP=845743016 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32087_791218442.dbf RECID=31928 STAMP=845743362 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32088_791218442.dbf RECID=31929 STAMP=845743365 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32089_791218442.dbf RECID=31930 STAMP=845743370 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32090_791218442.dbf RECID=31931 STAMP=845743372 deleted archived log archived log file name=/oracle/PIQ/oraarch/PIQarch1_32091_791218442.dbf RECID=31932 STAMP=845743376 Deleted 18 EXPIRED objects |
原因分析:
資料庫的archivelog檔案被手工刪除,但是控制檔案仍然記錄了歸檔日誌的備份資訊,rman做歸檔備份時還是要備份被無意刪除的檔案,但檔案已經被物理刪除,磁碟上找不到就會報錯,透過rman crosscheck archivelog all也可以看到檔案已經失效,所以備份之前先將歸檔檔案從控制檔案中刪除,然後備份就會成功;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
本文作者:JOHN
ORACLE技術部落格:ORACLE 獵人筆記 資料庫技術群:367875324 (請備註ORACLE管理 )
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12679300/viewspace-1191462/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- oracle 刪除過期的歸檔日誌Oracle
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- [20221121]rman刪除歸檔日誌問題.txt
- 歸檔日誌挖掘
- PostgreSQL 歸檔日誌SQL
- oracle歸檔日誌Oracle
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- 在Oracle中,如何定時刪除歸檔日誌檔案?Oracle
- RMAN備份整庫和歸檔日誌的方法
- 歸檔oracle alert日誌Oracle
- 14. 日誌歸檔
- Oracle歸檔日誌清理Oracle
- RMAN-ERROR:因為找不到過期和丟失的歸檔日誌而備份失敗Error
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- 批量註冊歸檔日誌
- MogDB/openGauss誤刪未歸檔的xlog日誌如何解決
- 通過RMAN設定standby接收日誌後主庫歸檔日誌才可刪除
- Oracle DataGuard歸檔日誌丟失處理方法Oracle
- 達夢資料庫DM8之刪除歸檔日誌檔案資料庫
- 配置rman來自動刪除應用過的歸檔日誌
- 在ASM磁碟組中刪除歸檔日誌報ORA-15028ASM
- DG歸檔日誌缺失恢復
- ArgoWorkflow教程(四)---Workflow & 日誌歸檔Go
- logminer異機挖掘歸檔日誌
- 測試在丟失歸檔日誌的情況下,跳過部分歸檔日誌進行資料恢復資料恢復
- 如何快速找到備份過最近、最大序號的歸檔日誌
- 歸檔日誌滿導致ORA-13516錯誤,awr報表不能自動收集
- 【REDO】Oracle 日誌挖掘,分析歸檔日誌線上日誌主要步驟Oracle
- rman 還原歸檔日誌(restore archivelogRESTHive
- oracle11G歸檔日誌管理Oracle
- oracle dg 歸檔日誌恢復情況Oracle
- 【SQL】Oracle 歸檔日誌暴增原因分析SQLOracle
- PostgreSQL的xlog/Wal歸檔及日誌清理SQL
- Oracle歸檔日誌暴增排查優化Oracle優化
- DG_保證歸檔日誌不能隨意被刪除的四種方法