Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Wednesday, 16 May 2012

RMAN Maintainance Command

RMAN REPORT
It provide analysis of your backup and recovery situation.
RMAN> REPORT NEED BACKUP
RMAN> REPORT NEED BACKUP RECOVERY WINDOW OF 14 DAYS;
RMAN> REPORT NEED BACKUP incremental 3 database;
RMAN> REPORT NEED BACKUP redundancy 3;
RMAN> REPORT NEED BACKUP days 3 tablespace system;
Reports which database files need to be backed up to meet a configured or specified retention policy as well as backup type
REPORT UNRECOVERABLE
Reports which database files require backup because they have been affected by some NOLOGGING operation.
RMAN> REPORT OBSOLETE
RMAN> REPORT OBSOLETE RECOVERY WINDOW OF 7 DAYS
Report the backup no longer needed (not useful for recovery)
RMAN> REPORT OBSOLETE ORPHAN
Report unusable because they belong to old incarnations that are not direct ancestors of the current incarnation.
RMAN> REPORT SCHEMA
Report Schema listed with the rman backup. You must connect to a recovery catalog when issuing a REPORT SCHEMA
RMAN> REPORT SCHEMA AT TIME 'SYSDATE-7'
reports the names of all datafiles and tablespaces one week ago
RMAN SHOW:
This command is used to display the values of current RMAN configuration settings.
RMAN> show all;
Shows all parameters.
RMAN> show archivelog backup copies;
Shows the number of archivelog backup copies.
RMAN> show archivelog deletion policy;
Shows the archivelog deletion policy.
RMAN> show auxname;
Shows the auxiliary database information.
RMAN> show backup optimization;
Shows whether optimization is on or off.
RMAN> show  auxiliary channel;
Shows how the normal channel and auxiliary hannel are configured.
RMAN> show controlfile autobackup;
Shows whether autobackup is on or off.
RMAN> show controlfile autobackup format;
Shows the format of the autobackup control file.
RMAN> show datafile backup copies;
Shows the number of datafile backup copies being ept.
RMAN> show default device type;
Shows the default type disk or tape.
RMAN> show encryption algorithm;
Shows the encryption algorithm currently in use.
RMAN> show encryption for database;
Shows the encryption for the database.
RMAN> show encryption for tablespace;
Shows the encryption for the tablespace.
RMAN> show exclude;
Shows the tablespaces excluded from the backup.
RMAN> show maxsetsize;
Shows the maximum size for backup sets. The default value is unlimited.
RMAN> show retention policy;
Shows the policy for datafile and control file backups and copies that RMAN marks as obsolete.
RMAN> show snapshot controlfile name;
Shows the snapshot control filename.
Note: You can use V$RMAN_CONFIGURATION view to check nondefault Rman configuration
LIST OF BACKUP:
This command is used to display the backup details
LIST BACKUP;
LIST BACKUP SUMMARY;
LIST BACKUP BY FILE;
LIST COPY OF DATABASE ARCHIVELOG ALL;
LIST BACKUP OF DATAFILE 3 SUMMARY;
LIST INCARNATION;
LIST ALL SCRIPT NAMES;
LIST BACKUPSET SUMMARY;
LIST BACKUPSET 3;
LIST ARCHIVELOG ALL;
LIST BAKCUP OF CONTROLFILE;‎
LIST COPY;‎
LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 3640;
LIST BACKUP OF DATAFILE;
LIST BACKUP RECOVERABLE;
LIST EXPIRED COPY;
LIST FAILURE;
ADVISE FAILURE;
REPAIR FAILURE; After above two command
PREVIEW BACKUP RESTORE:
RESTORE DATABASE PREVIEW;
RESTORE TABLESPACE users PREVIEW;
RESTORE DATAFILE 3 PREVIEW;
RESTORE ARCHIVELOG FROM LOGSEQ 200 PREVIEW;
RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' PREVIEW;
RESTORE ARCHIVELOG FROM SCN 234546 PREVIEW;
PREVIEW RECALL RESTORE:
restore archivelog all preview recall;
RESTORE TABLESPACE users PREVIEW RECALL;
RESTORE DATAFILE 3 PREVIEW RECALL;
DELETE BACKUP:
DELETE OBSOLETE;
DELETE FORCE BACKUP;‎
DELETE EXPIRE; It will run after CROSSCHECK
DELETE BACKUPSET 400;
VALIDATE BACKUP:
VALIDATE BACKUPSET 1;
NOTE: This command is used only after the "restore preview" when needed backup are stored on remotly.
RETORE TABLESPACE SYSTEM VALIDATE
RESTORE ARCHIVELOG ALL VALIDATE
RESTORE CONTROLFILE VALIDATE;
RESTORE DATAFILE 4,5,6 VALIDATE;

0 comments:

Post a Comment