RMAN故障一例(归档的备份,从不obsolete)

近期的rman备份中,归档日志的备份没有被删除,rman的脚本和策略都没变过,归档的备份一直保留,每过一段时间就要物理删除备份,很是奇怪。

rman的configure如下

RMAN> show all;

RMAN configuration parameters for database with db_unique_name HUBSRAC are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 20 TIMES TO DISK;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+dg_redo/hubsrac/snapcf_hubsrac.f';

RMAN> corsscheck backup;

RMAN> report obsolete;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

Report of obsolete backups and copies

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f

发现obsolete的列表里,只有一个controlfile的copy,而且是三个月前的?推算一下,应该是这个库之前做standby的时候遗留下来的,尝试删除这个过期的备份


RMAN> delete obsolete;


RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

using channel ORA_DISK_1

Deleting the following obsolete backups and copies:

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f


Do you really want to delete the above objects (enter YES or NO)? YES

deleted control file copy

control file copy file name=+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f RECID=44 STAMP=913299266

Deleted 1 objects


注意已经提示Deleted 1 objects,但是在此report时会发现,这个记录仍然存在

RMAN> report obsolete;


RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

Report of obsolete backups and copies

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f

换一种方法删除

RMAN> CROSSCHECK CONTROLFILECOPY '+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f';


released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=2064 instance=orclrac2 device type=DISK

validation failed for control file copy

control file copy file name=+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f RECID=44 STAMP=913299266

Crosschecked 1 objects

RMAN> delete obsolete;


RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

using channel ORA_DISK_1

Deleting the following obsolete backups and copies:

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f


Do you really want to delete the above objects (enter YES or NO)? YES

deleted control file copy

control file copy file name=+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f RECID=44 STAMP=913299266

Deleted 1 objects


仍让存在。。。

RMAN> report obsolete;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

Report of obsolete backups and copies

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f

再换一种方法

RMAN> DELETE FORCE NOPROMPT OBSOLETE DEVICE TYPE DISK; 

If RMAN-06214 still occurs, then try


RMAN> CROSSCHECK COPY OF CONTROLFILE;


还是存在

RMAN> report obsolete;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

Report of obsolete backups and copies

Type Key Completion Time Filename/Handle

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

Control File Copy 44 2016/05/31 14:14:26 +DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f


没办法了,uncatalog之后就没有了,官方上给出的方法:

RMAN> change controlfilecopy '+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f' uncatalog;


uncataloged control file copy

control file copy file name=+DG_REDO01/orclrac/control_snapshot/snapcf_orclrac1.f RECID=44 STAMP=913299266

Uncataloged 1 objects


过期的控制文件备份是干掉了,可是再次去检查obsolete,发现那些老的归档日志备份仍然不是obsolete~

查看一下capture,发现有ogg的capture注册在数据库

SQL> col required_checkpoint_scn for 9999999999999999999

SQL> select capture_name, required_checkpoint_scn from dba_capture;


CAPTURE_NAME REQUIRED_CHECKPOINT_SCN

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

OGG$CAP_FM1 46264409580

OGG$CAP_ET1 46264410538

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fd20ccaa295f21384ab809fcb19881c3.html