0% found this document useful (0 votes)
211 views

Rman Commands

This document provides examples of RMAN commands for listing, validating, deleting, and reporting on backups and archived redo logs. It includes commands for listing all backups, backups of specific datafiles or control files, datafile image copies, archived redo logs, and backup sets. It also includes commands for validating backups, deleting expired, obsolete or specific backups and archived redo logs, reporting on needed backups and obsolete backups, and crosschecking and deleting backups.

Uploaded by

haftamu
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
211 views

Rman Commands

This document provides examples of RMAN commands for listing, validating, deleting, and reporting on backups and archived redo logs. It includes commands for listing all backups, backups of specific datafiles or control files, datafile image copies, archived redo logs, and backup sets. It also includes commands for validating backups, deleting expired, obsolete or specific backups and archived redo logs, reporting on needed backups and obsolete backups, and crosschecking and deleting backups.

Uploaded by

haftamu
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

report schema; // list all datafiles

list backup summary;


list backup of database; // lists all BACKUP SETS backups of the database
list backup; // lists all backup BACKUP SETS backups of datbase,spfile and control
file, archivelog
LIST BACKUP OF DATAFILE 1; //To list all existing backups of a specific datafile
use:

list copy of database; // lists all image copies backups of the database
LIST BACKUP OF DATAFILE 1; //To list all existing backups of a specific datafile
use:

Datafile Image Copies


======================

RMAN> LIST DATAFILECOPY ALL; //To list all datafile image copies use:
RMAN> LIST COPY OF DATAFILE 1; // tO ALL copies of a specific datafile
RMAN> LIST DATAFILECOPY <key>; To list an individual datafile image copy use:
RMAN> LIST DATAFILECOPY 26;
RMAN> LIST DATAFILECOPY '/u01/app/oracle/copy/users01.dbf';//Alternatively specify
the name of the datafile image copy

LIST controlfile
======================
RMAN> LIST COPY OF CONTROLFILE;
RMAN> LIST BACKUP OF CONTROLFILE;
RMAN> LIST CONTROLFILECOPY 56;

LIST SPfile
======================

RMAN> LIST BACKUP OF SPFILE;

ARCHIVELOG;
RMAN> LIST ARCHIVELOG ALL;
RMAN> LIST BACKUP OF ARCHIVELOG ALL;

DELETE NOPROMPT BACKUPSET 103, 102, 101, 100;


DELETE BACKUPPIECE 101;
DELETE CONTROLFILECOPY '/tmp/control01.ctl';
DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 300;
DELETE BACKUP TAG='before_upgrade';
DELETE BACKUP OF TABLESPACE users DEVICE TYPE sbt; # delete only from tape
DELETE COPY OF CONTROLFILE LIKE '/tmp/%'; #
DELETE BACKUP;
DELETE ARCHIVELOG ALL
BACKED UP 3 TIMES TO sbt;
DELETE NOPROMPT ARCHIVELOG ALL;
DELETE ARCHIVELOG UNTIL SEQUENCE = 28880;
DELETE ARCHIVELOG UNTIL SEQUENCE = 37368;
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'sysdate-1';
DELETE FORCE ARCHIVELOG ALL BACKED UP 2 TIMES to disk;

CROSSCHECK BACKUP;
DELETE EXPIRED BACKUP;
DELETE FORCE NOPROMPT BACKUPSET TAG 'weekly_bkup';
DELETE OBSOLETE;
DELETE OBSOLETE REDUNDANCY = 3;
DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS;

report
report schema; // list all datafiles
select OBSOLETE from V$BACKUP_FIELS;
select OBSOLETE from RC_BACKUP_FIELS;
REPORT NEED BACKUP; // DEFAULT
EPORT OBSOLETE REDUNDANCY 2;
REPORT UNRECOVERABLE;

// expired, obsolete,

report obsolete;
delete backupset 31,31;
delete backuset;

// for validation
VALIDATE BACKUPSET 35;
VALIDATE DATABASE;

DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 28637;


DELETE ARCHIVELOG UNTIL SEQUENCE = 28637;

DELETE ARCHIVELOG UNTIL SEQUENCE = 28880;


DELETE ARCHIVELOG ALL COMPLETED BEFORE ‘sysdate-1’;
DELETE FORCE ARCHIVELOG ALL BACKED UP 2 TIMES to disk;

crosscheck archivelog all;


delete noprompt expired archivelog all;
crosscheck archivelog all;

delete expired archivelog all;


crosscheck archivelog all;
delete archivelog until time 'sysdate -1';
crosscheck archivelog all;

DELETE BACKUPPIECE 101;


DELETE CONTROLFILECOPY '/tmp/control01.ctl';
DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 300;
DELETE BACKUP TAG='before_upgrade';

CROSSCHECK BACKUP;
DELETE EXPIRED BACKUP;
DELETE FORCE NOPROMPT BACKUPSET TAG 'weekly_bkup';

DELETE OBSOLETE;
DELETE OBSOLETE REDUNDANCY = 3
DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS;

CROSSCHECK BACKUPSET 13, 12, 11;


DELETE NOPROMPT BACKUPSET 13, 12, 11;

You might also like