ITPub博客

首页 > 数据库 > Oracle > RMAN 中V$ARCHIVED_LOG 中STATUS 为"X" 的文件处理

RMAN 中V$ARCHIVED_LOG 中STATUS 为"X" 的文件处理

原创 Oracle 作者:zhulch 时间:2007-02-07 14:45:12 0 删除 编辑

记录一下

[@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博客 ” ,链接:https://blog.itpub.net/7318139/viewspace-898158/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    554
  • 访问量
    2318281