RMAN Lists Crosschecks and Reports

RMAN Lists

For complete list of syntax and options see link

The primary purpose of the LIST command is to determine which backups or copies are available. Note that only backups and copies that completed successfully are stored in the repository. For example, you can list:

  • Backups (backup sets and proxy copies) or image copies recorded in the RMAN repository
  • Backups or image copies of a specified database, tablespace, datafile, archived redo log, or control file
  • Backups and image copies that have expired
  • Backups and image copies restricted by options such as time, path name, device type, tag, or recoverability
  • Incarnations of a specified database

list backup;

list backup of database; # lists backups of all files in database

list backup of datafile ‘/oracle/dbs/tbs_1.f’; #lists backup of specified datafile

list backup of tablespace SYSTEM; # lists all backups of SYSTEM tablespace

list backup of archivelog all; # lists all archived redo logs and copies of logs

list backup of controlfile; # lists all control file backups list expired backup;

list incarnation;

RMAN Crosschecks

Crosschecks update outdated RMAN repository information about backups whose repository records do not match their physical status. For example, if a user removes archived logs from disk with an operating system command, the repository still indicates that the logs are on disk, when in fact they are not.

If the backup is on disk, then the CROSSCHECK command determines whether the header of the file is valid. If the backup is on tape, then the command simply checks that the backup exists. The possible status values for backups are AVAILABLE, UNAVAILABLE, and EXPIRED.

CROSSCHECK BACKUP;

CROSSCHECK COPY; # crosschecks only disk copies of db files

CROSSCHECK BACKUPSET; # crosschecks backupsets on disk and SBT

CROSSCHECK BACKUP OF DATAFILE “?/oradata/trgt/system01.dbf” COMPLETED AFTER ‘SYSDATE-14’;

CROSSCHECK BACKUP OF ARCHIVELOG ALL SPFILE;


Reporting on Backups, Copies, and Database Schema

To gain more detailed information from the RMAN repository, generate a report. Use the REPORT command to answer questions such as the following:

  • Which files need a backup?
  • Which files have had unrecoverable operations performed on them?
  • Which backups or copies are obsolete and can be deleted?
  • What was the physical schema of the database at some previous time?
  • Which files have not been backed up recently?

report schema at time ‘SYSDATE-7’;

report need backup days 2 tablespace system;

report unrecoverable;

report obsolete;

REPORT NEED BACKUP INCREMENTAL = 1 DATABASE;

REPORT OBSOLETE RECOVERY WINDOW OF 7 DAYS; # lists backups or copies that are superfluous because more than 2 copies of the # files exist on tape

REPORT OBSOLETE REDUNDANCY = 2 DEVICE TYPE sbt;

REPORT SCHEMA AT SCN 1000; # schema as it existed at scn 1000

REPORT SCHEMA AT SEQUENCE 100 THREAD 1; # schema as it existed at log sequence 100

Monitor RMAN job progress

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) “%_COMPLETE”FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE ‘RMAN%’
AND OPNAME NOT LIKE ‘%aggregate%’
AND TOTALWORK != 0   AND SOFAR <> TOTALWORK

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: