清除Oracle控制檔案中的歸檔資訊v$archived_log

不一樣的天空w發表於2020-09-01

http://blog.itpub.net/28878983/viewspace-2135807/


execute sys.dbms_backup_restore.resetCfileSection( 11);  ==> 清理v$ARCHIVED_LOG對應的記錄

execute sys.dbms_backup_restore.resetCfileSection(28);  ==>清理v$rman_status對應的記錄


--以上是2個例子,具體的section_id可以這樣獲得:

SQL> select rownum-1, type from v$controlfile_record_section;


  ROWNUM-1 TYPE

---------- ----------------------------

         0 DATABASE

         1 CKPT PROGRESS

         2 REDO THREAD

         3 REDO LOG

         4 DATAFILE

         5 FILENAME

         6 TABLESPACE

         7 TEMPORARY FILENAME

         8 RMAN CONFIGURATION

         9 LOG HISTORY

        10 OFFLINE RANGE


  ROWNUM-1 TYPE

---------- ----------------------------

        11 ARCHIVED LOG

        12 BACKUP SET

        13 BACKUP PIECE

        14 BACKUP DATAFILE

        15 BACKUP REDOLOG

        16 DATAFILE COPY

        17 BACKUP CORRUPTION

        18 COPY CORRUPTION

        19 DELETED OBJECT

        20 PROXY COPY

        21 BACKUP SPFILE


  ROWNUM-1 TYPE

---------- ----------------------------

        22 DATABASE INCARNATION

        23 FLASHBACK LOG

        24 RECOVERY DESTINATION

        25 INSTANCE SPACE RESERVATION

        26 REMOVABLE RECOVERY FILES

        27 RMAN STATUS

        28 THREAD INSTANCE NAME MAPPING

        29 MTTR

        30 DATAFILE HISTORY

        31 STANDBY DATABASE MATRIX

        32 GUARANTEED RESTORE POINT


  ROWNUM-1 TYPE

---------- ----------------------------

        33 RESTORE POINT


34 rows selected.



關鍵知識點

1.執行包sys.dbms_backup_restore.resetCfileSection(11),清理v$ARCHIVED_LOG對應的記錄;

2. catalog start with新增物件到備份記錄中;


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

相關文章