Friday, January 6, 2017

RMAN Backup error: What to do if some archivelog is missing or datafile is offline during RMAN backup?

I always encounters the problem while my seminars that what DBA should do if some archivelog is missing during RMAN backup.
I think apart from crossing the fingers, one can at least make successful backup. backup should not be missed even if you miss some of the files. Nothing is important than successful backup. All future recovery depends upon the presence of backups.
RMAN> crosscheck archivelog all;
and then follwoing to delete expired archivelog.
RMAN> delete expired archivelog all;
Also refer to the skip inaccessible clause of the backup command. for example...
RMAN> backup archivelog all skip inaccessible delete input;
RMAN> change archivelog all validate;

because without it "skip inaccessible" will be needed any time You will start backup of archs.
Moreover, it can be done with following way also:
for the missing archive logs... u can do the following
connect target /
connect catalog rman/pwd@rmancatalog
run {
change archivelog from logseq = xxx until logseq =
yyy unavailable;
}
xxx and yyy are the logseg numbers, the one's you are missing.
RMAN> RUN
{
SET MAXCORRUPT FOR DATAFILE 1 TO 10;
BACKUP DATABASE
SKIP INACCESSIBLE
SKIP READONLY
SKIP OFFLINE;
}
To back up the database while skipping offline and read-only tablespaces, you can run the following command:
RMAN> BACKUP DATABASE
SKIP READONLY
SKIP OFFLINE;
Above discussion include other file types also if they are not available during backup and backup is generating exception.

No comments:

Post a Comment