RMAN 中V$ARCHIVED_LOG 中STATUS 為"X" 的檔案處理

zhulch發表於2007-02-07

記錄一下

[@more@]

今天發現RMAN 中V$ARCHIVED_LOG 中STATUS 為"X" 的檔案,想起是因為手動刪掉錯幾個日誌造成的,透過如下的方法把RMAN 中的記錄也刪掉

test:oracle] /oracle/home> rman target /

Recovery Manager: Release 10.2.0.2.0 - Production on Wed Feb 7 14:31:47 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PRD (DBID=2733534212)


RMAN> crosscheck archivelog all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=333 devtype=DISK
validation failed for archived log
archive log filename=/testarch2/1_1067_612495174.dbf recid=1032 stamp=61360214
8
validation failed for archived log
archive log filename=/testarch2/1_1068_612495174.dbf recid=1033 stamp=61360250
9
validation failed for archived log

alidation failed for archived log
archive log filename=/testarch2/1_1073_612495174.dbf recid=1038 stamp=61360322
6
validation failed for archived log
archive log filename=/testarch2/1_1074_612495174.dbf recid=1039 stamp=61361285
9
validation failed for archived log
archive log filename=/testarch2/1_1075_612495174.dbf recid=1040 stamp=61361315
1
validation failed for archived log
archive log filename=/testarch2/1_1076_612495174.dbf recid=1041 stamp=61361334
3
validation failed for archived log
archive log filename=/testarch2/1_1077_612495174.dbf recid=1042 stamp=61361389
1
validation failed for archived log
archive log filename=/testarch2/1_1078_612495174.dbf recid=1043 stamp=61361574
1
validation failed for archived log
archive log filename=/testarch2/1_1079_612495174.dbf recid=1044 stamp=61361599
9

RMAN> delete expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=333 devtype=DISK

List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
1032 1 1067 X 03-FEB-07 /testarch2/1_1067_612495174.dbf
1033 1 1068 X 03-FEB-07 /testarch2/1_1068_612495174.dbf
1034 1 1069 X 03-FEB-07 /testarch2/1_1069_612495174.dbf
1035 1 1070 X 03-FEB-07 /testarch2/1_1070_612495174.dbf

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archive log
archive log filename=/testarch2/1_1067_612495174.dbf recid=1032 stamp=61360214
8
deleted archive log
archive log filename=/testarch2/1_1068_612495174.dbf recid=1033 stamp=61360250
9
deleted archive log
archive log filename=/testarch2/1_1069_612495174.dbf recid=1034 stamp=61360266
7

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 28 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 19 24-JAN-07
Backup Piece 19 24-JAN-07 arch612727822_21_1
Backup Set 20 24-JAN-07

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

相關文章