Part Number | Command # | Command | Objective |
Part-1 | Check RMAN configuration, backup and tablespaces | ||
1 | show all; | To check the current RMAN settings | |
2 | list backup; | To check the available backups | |
3 | report schema; | To check the tablespace and datafile sizes. | |
Part-2 | Backup Management | ||
1 | delete backup; | To delete the backup from RMAN’s repository | |
2 | delete force backup; | To delete the backups from RMAN’s repository regardless of files physical availability | |
3 | delete noprompt force backup; | To delete the backups from RMAN’s repository without prompting. | |
4 | DELETE BACKUP COMPLETED BEFORE 'SYSDATE-7' | To delete backup that are older than 7 days | |
5 | DELETE BACKUP COMPLETED After 'SYSDATE-7' | To delete backup from past 7 days til now | |
6 | DELETE BACKUP COMPLETED BETWEEN 'sysdate-7' and 'sysdate-3'; | To delete backup between two dates. | |
Part-3 | Archivelog Management | ||
LIST | 1 | list archivelog all; | To check the available archive logs |
2 | list archivelog from time 'sysdate-2'; | To check the last 1 day of archivelogs | |
3 | list archivelog from scn 123; | To list all archivelogs from a particular SCN Note: You may have to check SCN # first from v$archived_log | |
4 | |||
DELETE | 1 | delete archivelog all; | To delete all the archivelogs |
2 | delete noprompt archivelog all; | To delete the archivelogs without prompting | |
3 | delete force noprompt archivelog all; | To delete the archivelogs withouth prompting and without checking its physical availability. | |
BACKUP | 1 | backup archivelog all; | |
2 | backup database plus archivelog all; | ||
3 | backup archivelog all delete input; | Backup all archivelog. Delete Once the backup is completed. | |
4 | backup archivelog all not backed up 1 times; | Backup all archivelog which are not backed up atleast once. | |
5 | backup archivelog all not backed up 1 times delete all input; | Backup all archivelog which are not backed up atleast once and then delete them. | |
6 | |||
Part-4 | Backup database manangement | ||
1 | backup database; | To take a full backup (without the intention of incremental backups). | |
2 | backup database plus archivelog; | ||
3 | |||
4 | BACKUP INCREMENTAL LEVEL 0 database; | To take a full backup (with the intention of incremental backups). | |
5 | backup incremental level 1 database; | To take a incremental backup. A type of incremental backup that backs up all blocks that have changed since the most recent backup at level 1 or level 0 | |
6 | BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE; | To take CUMALATIVE backup: This backups up all the blocks changed since the most recent backup at level 0. When recovering with cumulative incremental backups, only the most recent cumulative incremental backup needs to be applied. | |
Part-5 | Backup archivelog manangement | ||
1 | delete expired backup; | Any backupset which cannot be found on OS file directly (either delete or moved), are marked as expired. | |
2 | RESTORE DATABASE VALIDATE; | Restore Validation confirms that a restore could be run, by confirming that all database files exist and are free of physical and logical corruption, this does not generate any output | |
3 | delete obsolete; | To delete any backups which are outside of retention policy. | |
4 | delete force obsolete; | To delete any backups which are outside of retention policy regardless of its physical availability. | |
5 | delete force noprompt obsolete; | To delete any backups which are outside of retention policy regardless of its physical availability. RMAN will not prompt user before deleting. | |
6 | delete archivelog until time '2007-04-30:09:30:50' backed up 1 times to device type disk; | ||
Part-6 | Block corruption, datafile corruption, | ||
1 | LIST FAILURE; | This will list the detected failure with the FAILURE ID | |
2 | LIST FAILURE 101 DETAIL; | Once the FAILURE ID is found out, you can find more details about that failure ID | |
3 | LIST RESTORE POINT ALL; | You can list restore points known to the RMAN repository. | |
4 | LIST INCARNATION | You can list all incarnations of a database. A new database incarnation is created when you open with the RESETLOGS option. | |
5 | |||
6 | VALIDAE DATABASE; | To validate database. If there is a datafile missing, it shows. If there is a block corruption, it records in v$database_block_corruption; use "blockrecover corruption list;" to fix corrupted blocks | |
7 | VALIDATE CHECK logical database; |
Wednesday, March 30, 2016
RMAN: RMAN Command Line Reference Guide
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment