RMAN ---delete obsolete 不能刪除 控制文件copy
RMAN ---delete obsolete 不能刪除 控制文件copy
|
解決方法:
RMAN> CROSSCHECK COPY;
specification does not match any datafile copy in the repository
specification does not match any archived log in the repository
validation failed for control file copy
control file copy file name=/home/oracle/control01.ctl RECID=4 STAMP=821523959
validation failed for control file copy
control file copy file name=/tmp/controlfile.bkp RECID=3 STAMP=813384451
validation failed for control file copy
control file copy file name=/tmp/contrlfile. RECID=2 STAMP=813384351
Crosschecked 3 objects
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy 2 22-APR-13 /tmp/contrlfile.
Control File Copy 3 22-APR-13 /tmp/controlfile.bkp
Control File Copy 4 23-JUL-13 /home/oracle/control01.ctl
RMAN> delete expired copy;
specification does not match any datafile copy in the repository
specification does not match any archived log in the repository
List of Control File Copies
===========================
Key S Completion Time Ckp SCN Ckp Time
------- - --------------- ---------- ---------------
4 X 23-JUL-13 2243850 23-JUL-13
Name: /home/oracle/control01.ctl
Tag: TAG20130723T090559
3 X 22-APR-13 1495438 22-APR-13
Name: /tmp/controlfile.bkp
Tag: TAG20130422T040730
2 X 22-APR-13 1490032 22-APR-13
Name: /tmp/contrlfile.
Tag: TAG20130422T040550
Do you really want to delete the above objects (enter YES or NO)? yes
deleted control file copy
control file copy file name=/home/oracle/control01.ctl RECID=4 STAMP=821523959
deleted control file copy
control file copy file name=/tmp/controlfile.bkp RECID=3 STAMP=813384451
deleted control file copy
control file copy file name=/tmp/contrlfile. RECID=2 STAMP=813384351
Deleted 3 EXPIRED objects
RMAN> report expired;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "expired": expecting one of: "device, need, obsolete, schema, unrecoverable"
RMAN-01007: at line 1 column 8 file: standard input
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
RMAN>
總結:
The CROSSCHECK
command checks whether RMAN backups and copies in the repository are still readable by RMAN. Assuming that you have configured automatic channels, you can run these commands:
RMAN> CROSSCHECK BACKUP; # checks RMAN backups on configured devices RMAN> CROSSCHECK COPY; # checks RMAN image copies on configured devices
這兩個命令還是有點區別的,主要還是要認清楚備份的類型。
If backups are stored with a media manager and sbt
channels are not configured, then you must allocate a maintenance channel before CROSSCHECK
and DELETE
commands on sbt
devices:
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;---如果使用磁帶庫來備份,需要開一個專用的維護通道。
RMAN> CROSSCHECK BACKUP;