Wednesday, April 9, 2014

RMAN command reference

LIST COMMAND


RMAN> LIST ARCHIVELOG ALL;
RMAN> LIST BACKUP OF ARCHIVELOG ALL;
RMAN> LIST BACKUP;
RMAN> LIST BACKUP OF DATABASE;
RMAN> LIST BACKUP OF DATAFILE 1;
RMAN> LIST BACKUP SUMMARY;
RMAN> LIST INCARNATION;
RMAN> LIST BACKUP BY FILE;
RMAN> LIST COPY OF DATABASE ARCHIVELOG ALL;
RMAN> LIST COPY OF DATAFILE 1, 2, 3;
RMAN> LIST BACKUP OF DATAFILE 11 SUMMARY;
RMAN> LIST expired Backup of archivelog all summary;
RMAN> LIST Backup of tablespace Test summary;
RMAN> LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 1437;
RMAN> LIST CONTROLFILECOPY “/tmp/cntrlfile.copy”;
RMAN> LIST BACKUPSET OF DATAFILE 1;
RMAN> LIST FAILURE;
RMAN> LIST FAILURE 641231 detail;
RMAN> LIST Backup of Controlfile;
RMAN> LIST Backup of Spfile;
RMAN> LIST Backup of Tablespace Test;
RMAN> LIST expired Backup;
RMAN> LIST expired Backup summary;
RMAN> LIST expired Backup of Archivelog all;
RMAN> LIST expired Backup of datafile 10;
RMAN> LIST recoverable backup;


COLD BACKUP


run
{
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
backup database as compressed backupset format '/dumps/DCOE01PR/cold_before_upgrade/dcoe01pr_DB_b4_upgrade_%u_%D_%M';
Backup current controlfile format '/dumps/DCOE01PR/cold_before_upgrade/dcoe01pr_CF_b4_upgrade_%u_%D_%M'; 
release channel d1;
release channel d2;
release channel d3;
release channel d4;

}



spool log to rman_debug_restore01.log
spool trace to rman_debug_restore01.trc
set echo on
run
{
allocate channel d1 device type disk;
allocate channel d2 device type disk;
allocate channel d3 device type disk;
allocate channel d4 device type disk;
allocate channel d5 device type disk;
allocate channel d6 device type disk;
allocate channel d7 device type disk;
allocate channel d8 device type disk;
allocate channel d9 device type disk;
allocate channel d10 device type disk;
allocate channel d11 device type disk;
allocate channel d12 device type disk;
allocate channel d13 device type disk;
allocate channel d14 device type disk;
allocate channel d15 device type disk;
allocate channel d16 device type disk;
debug all;
restore database check readonly;
debug off;
release channel d1;
release channel d2;
release channel d3;
release channel d4;
release channel d5;
release channel d6;
release channel d7;
release channel d8;
release channel d9;
release channel d10;
release channel d11;
release channel d12;
release channel d13;
release channel d14;
release channel d15;
release channel d16;
}
spool trace off

spool log off


restore database check readonly;

No comments:

Post a Comment