Monday, January 6, 2014

RMAN Reporting commands

RMAN – Reporting commands

LIST
lists details of backups, archived logs, and database incarnations.

LIST BACKUP;                                     List all backup sets, image copies and proxy copies.

LIST BACKUP SUMMARY;             As above but significantly more concise and usable;
LIST BACKUPSET;                              Lists only backup sets and proxy copies (can also use the summary option).
LIST COPY;                                           Lists only Image copies (cannot use the summary option).


LIST EXPIRED BACKUP;                   Backups did not found after crosscheck.

That is backup is manually moved or deleted from OS.

Obsolete can only be viewed from the REPORT command


LIST BACKUP BY FILE;                      List backup by Datafile, archivelogs, controlfile, spfile.

Easier to read than LIST BACKUP but obviously not ordered by set no.


LIST BACKUP OF DATABASE;       List backups but only data files.

LIST BACKUP OF DATAFILE 1;      As above only for a single data file.

 

LIST BACKUP LIKE '/tmp/%';        copy only

 

Other example variations

 

LIST ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE DISK;

LIST COPY OF DATAFILE 2 COMPLETED BETWEEN '01-JAN-2014' AND '07-JAN-2014';
LIST INCARNATION;

LIST INCARNATION OF DATABASE;

                               
REPORT

analyses the available backups and return results about while files need backup which files are obsolete etc.

If backups have been deleted from disk or tape outside of RMAN, reports generated by RMAN will not automatically reflect these changes. Always run CROSSCHECK of all backup before reporting to update repository.

REPORT SCHEMA;                            Displays information about the database files. The isn’t an easier way of displaying this information.

REPORT OBSOLETE;                         Displays the backups that are obsolete according to the current retention policy.

REPORT NEED BACKUP;                 Determine which database files need backup for the retention policy.

REPORT UNRECOVERABLE;          Report which database files require backup because they have been affected by some NOLOGGING operation.

Other example variations


REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE SKIP TABLESPACE data01;

If you use Recovery Catalogue then past data can be shown.
REPORT SCHEMA AT TIME 'SYSDATE-10';


DELETE
used to delete any backup or backupsets.


delete backupset all;                                               Delete all backup sets

delete copy all;                                                            Delete all image copies.
DELETE OBSOLETE;                                                           Delete obsolete Backups.

DELETE EXPIRED BACKUP;                                            Delete expired RMAN backup following CROSSCHECK

DELETE CONTROLFILECOPY '/tmp/ctl01.ctl';          Delete backups by filename on disk
DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 5;                Delete archive logs from disk based on sequence
DELETE BACKUP TAG='a_tag';                                     Delete backups based on tags

Other example variations

DELETE OBSOLETE REDUNDANCY = 2;
DELETE OBSOLETE RECOVERY WINDOW OF 4 DAYS;

Happyjohn

No comments:

Post a Comment