Recovery Catalog   «Prev  Next»
Lesson 4 Using the report command
Objective Use the Oracle Report Command

Oracle Report Command Options

Use Oracle Report Command

Recovery Manager provides detailed reporting through the use of either the report or the list command. In this lesson, we will review the options for the report command and identify why you might want to use report.

Syntax and examples

Below is a list of the more frequent uses of the report command. To obtain a detailed listing, please refer to the Oracle8 documentation.
  1. Use report to report on objects that need to be backed up based on incremental or day constraints. The integer in the command line represents the number of incremental backups, days since last full or incremental backup, or a minimum level of redundancy.
    report need backup {incremental, days, redundancy} integer {datafile, database, tablespace};
    1. report need backup days 50 datafile
    2. report need backup incremental 2 database
    3. report need backup redundancy 3
  2. Use report to report on which objects might be unrecoverable if your system fails, such as a disk crashing. By running a report command, you can determine which data files are unrecoverable.
    report unrecoverable {datafile, database, tablespace} name report unrecoverable datafile "C:\oracle8\database\usr1orc1.ora"
  3. Use report to report on the current schema of your target database or the state of the schema at a specific point in time, system control number (SCN), or log sequence number:
    report schema {
    at time "time", at scn integer, at logseq integer
    }
    
    1. report schema
  4. Use report to determine which backups are obsolete while maintaining a certain backup redundancy. These backups can then be deleted.
    report obsolete redundancy=integer
    1. report obsolete redundancy=2
The following Slide Show demonstrates some examples:
  1. This is the schema of orc1
  2. This is an indication that your client's database has not been backed up for quite some time
  3. This indicates that there are no obsolete backups - which you would expect after viewing the previous screenshot
  4. This shows that all of your client's objects are recoverable

Using Report Schema

Reporting on Database Files and Backups

The REPORT command performs more complex analysis than LIST. Some main options are shown in Table 2.
Table 2: Report Commands
Option Example Explanation
NEED BACKUP REPORT NEED BACKUP DATABASE Shows which files need backing up under current retention policy. Use optional REDUNDANCY and RECOVERY WINDOW parameters to specify different criteria.
OBSOLETE REPORT OBSOLETE Lists backups that are obsolete under the configured backup retention policy. Use the optional REDUNDANCY and RECOVERY WINDOW parameters to override the default.
SCHEMA REPORT SCHEMA Reports the tablespaces and data files in the database at the current time (default) or a different time.
UNRECOVERABLE REPORT UNRECOVERABLE Lists all data files for which an unrecoverable operation has been performed against an object in the data file since the last backup of the data file.

To generate reports of database files and backups:
  1. Start RMAN and connect to a target database.
  2. Run the REPORT command at the RMAN prompt.
The following example reports backups that are obsolete according to the currently configured backup retention policy:
REPORT OBSOLETE;
The following example reports the data files and temp files in the database:
REPORT SCHEMA;

In the next lesson, you will learn how to use the list command to display information contained in your recovery catalog.