Oracle® Database Backup and Recovery Reference 10g Release 2 (10.2) Part Number B14194-03 |
|
|
PDF · Mobi · ePub |
report::=
reportObject::=
atClause::=
To perform detailed analyses of the RMAN repository. The Database writes the output from the REPORT
command to standard output or the message log file.
Use the REPORT
command to answer questions such as the following:
Which files need a backup?
Which files have not had a backup for some time?
Which files are not recoverable due to unrecoverable operations?
Which backup files can be deleted?
What was the physical schema of the database at a previous time?
See Also:
Oracle Database Backup and Recovery Basics to learn how to use RMAN's reporting functionalityExecute this command only at the RMAN prompt.
You must connect to a recovery catalog when issuing a REPORT
SCHEMA
command with the AT
TIME
, AT
SCN
, or AT
SEQUENCE
options. Otherwise, a recovery catalog is not required for the REPORT
command.
Syntax Element | Description |
---|---|
NEED BACKUP |
Lists all datafiles in need of a new backup. The report assumes that you will use the most recent backup for restore operations. If you do not specify any option, then RMAN uses the current retention policy configuration. If the retention policy is disabled (CONFIGURE RETENTION POLICY TO NONE ), RMAN generates an error. |
DAYS = integer |
Lists all datafiles requiring more than the specified number of days' worth of archived redo log files for complete recovery. For example, REPORT NEED BACKUP DAYS 7 DATABASE shows the datafiles whose recovery requires more than seven days' worth of archived redo logs.
If the target database control file is mounted and current, then RMAN makes the following optimizations to this report:
|
INCREMENTAL = integer |
Specifies a threshold number of incremental backups required for recovery. If complete recovery of a datafile requires more than integer incremental backups, then the datafile requires a new full backup.
Note: Files for which no backups exist will not appear in this list: issue the |
RECOVERY WINDOW OF integer DAYS |
Reports datafiles for which there are not sufficient backups to satisfy a recovery window-based retention policy for the specified number of days, that is, datafiles without sufficient backups for point-in-time recovery to any point back to the time SYSDATE - integer . |
REDUNDANCY = integer |
Specifies the minimum number of backups or copies that must exist for a datafile to be considered not in need of a backup. In other words, a datafile needs a backup if there are fewer than integer backups or copies of this file. For example, REDUNDANCY 2 means that if there are fewer than two copies or backups of a datafile, then it needs a new backup. |
OBSOLETE obsOperandList |
Lists full backups, datafile copies, and archived logs recorded in the RMAN repository that can be deleted because they are no longer needed. The subclause obsOperandList describes the criteria that RMAN uses to determine what is obsolete. If you do not specify parameters in obsOperandList, then RMAN uses the options specified in CONFIGURE RETENTION POLICY . If you use this option in conjunction with DEVICE TYPE , then RMAN only considers backups and copies created on the specified device.
Note: Even if you use a |
SCHEMA |
Lists the names of all datafiles and tablespaces at the specified point in time. |
UNRECOVERABLE |
Lists all unrecoverable datafiles. A datafile is considered unrecoverable if an unrecoverable operation has been performed against an object residing in the datafile since the last backup of the datafile.
Note: The nonexistence of any backup of a datafile is not sufficient reason to consider it unrecoverable. Such datafiles can be recovered through the use of the |
DEVICE TYPE deviceSpecifier |
Specifies the type of storage device. RMAN only considers backups and copies available on the specified device for its report. |
Syntax Element | Description |
---|---|
reportObject |
Specifies the datafiles to be included in the report. The report can include the entire database (optionally skipping certain tablespaces), a list of tablespaces, or a list of datafiles.
Note: RMAN includes objects from prior incarnations. |
DATAFILE datafileSpec |
Lists the specified datafiles. RMAN reports on backups or datafile copies that contain at least one of the specified datafiles. |
TABLESPACE 'tablespace_name' |
Lists datafiles in the specified tablespace. RMAN reports on backups or datafile copies that include at least one datafile from a specified tablespace. |
DATABASE |
Lists backups or datafile copies of all files in the current database. Specify SKIP TABLESPACE tablespace_name to exclude the specified tablespace from the DATABASE specification. |
Syntax Element | Description |
---|---|
atClause |
Specifies a point in time as a time, an SCN, or a log sequence number. |
AT TIME = ' date_string ' |
Specifies a date. The NLS_LANG and NLS_DATE_FORMAT environment variables specify the format for the time. |
AT SCN = integer |
Specifies an SCN. |
AT SEQUENCE = integer THREAD = integer |
Specifies a log sequence number for a specified redo THREAD number. The integer indicates the time when the specified log and thread were first opened. |
The information that appears in the output is described in the following tables:
Table 2-23, "Report of Files that Need Backup Due to Unrecoverable Operations"
Table 2-24, "Report of Files with Fewer Than n Redundant Backups"
Table 2-25, "Report of Files Whose Recovery Needs More Than n Days of Archived Logs"
Table 2-26, "Report of Files That Need More than n Incrementals During Recovery"
Table 2-21 Report of Database Schema
Column | Indicates |
---|---|
|
The absolute datafile number. |
|
The size of the file in kilobytes. |
|
The tablespace name. |
|
For datafiles only. |
|
For datafiles only. The filename of the datafile. |
|
For tempfiles only. The maximum size of the tempfile. |
|
For tempfiles only. The filename of the tempfile. |
Table 2-22 Report of Obsolete Backups and Copies
Column | Indicates |
---|---|
|
Whether the object is a backup set, backup piece, proxy copy, or datafile copy. |
|
A unique key that identifies this backup in the target database control file. |
|
The time that the backup or copy completed. |
|
The filename or media handle of the backup or datafile copy. |
Table 2-23 Report of Files that Need Backup Due to Unrecoverable Operations
Column | Indicates |
---|---|
|
The absolute number of the datafile that needs a new backup due to unrecoverable operations. |
|
|
|
The name of the datafile. |
Table 2-24 Report of Files with Fewer Than n Redundant Backups
Column | Indicates |
---|---|
|
The absolute datafile number of a datafile with less than n redundant backups. |
|
The number of backups that exist for this file. |
|
The name of the file. |
Table 2-25 Report of Files Whose Recovery Needs More Than n Days of Archived Logs
Column | Indicates |
---|---|
|
The absolute file number of a datafile that requires more than n days of archived redo logs for recovery. |
|
The number of days of archived redo data required for recovery. |
|
The name of the datafile. |
Table 2-26 Report of Files That Need More than n Incrementals During Recovery
Column | Indicates |
---|---|
|
The absolute file number of a datafile that requires more than n incrementals for complete recovery. |
|
The number of incremental backups required for complete recovery. |
|
The name of the datafile. |
Reporting Database Schema: Example This example, which requires a recovery catalog, reports the names of all datafiles and tablespaces one week ago:
REPORT SCHEMA AT TIME 'SYSDATE-7'; Report of database schema File K-bytes Tablespace RB segs Datafile Name ---- ---------- -------------------- ------- ------------------- 1 307200 SYSTEM *** /oracle/oradata/trgt/system01.dbf 2 20480 UNDOTBS *** /oracle/oradata/trgt/undotbs01.dbf 3 10240 CWMLITE *** /oracle/oradata/trgt/cwmlite01.dbf 4 10240 DRSYS *** /oracle/oradata/trgt/drsys01.dbf 5 10240 EXAMPLE *** /oracle/oradata/trgt/example01.dbf 6 10240 INDX *** /oracle/oradata/trgt/indx01.dbf 7 10240 TOOLS *** /oracle/oradata/trgt/tools01.dbf 8 10240 USERS *** /oracle/oradata/trgt/users01.dbf
Reporting Datafiles Needing Incremental Backups: Example This example reports all datafiles in the database that require the application of five or more incremental backups to be recovered to their current state:
REPORT NEED BACKUP INCREMENTAL 5 DATABASE; Report of files that need more than 5 incrementals during recovery File Incrementals Name ---- ------------ ---------------------------------------------- 2 9 /oracle/oradata/trgt/undotbs01.dbf 3 9 /oracle/oradata/trgt/cwmlite01.dbf 4 9 /oracle/oradata/trgt/drsys01.dbf
Reporting Datafiles Needing Backups: Example The following example reports all datafiles from tablespace SYSTEM
that will need more than two days of archived redo logs to be applied during recovery after being restored from the most recent backup:
REPORT NEED BACKUP DAYS 2 TABLESPACE SYSTEM; Report of files whose recovery needs more than 2 days of archived logs File Days Name ---- ----- ----------------------------------------------------- 1 3 /oracle/oradata/trgt/drsys01.dbf.f
Reporting Unrecoverable Datafiles: Example The following example reports all datafiles that cannot be recovered from existing backups because redo may be missing:
REPORT UNRECOVERABLE; Report of files that need backup due to unrecoverable operations File Type of Backup Required Name ---- ----------------------- ----------------------------------- 1 full /oracle/oradata/trgt/system01.dbf
Reporting Obsolete Backups and Copies: Example The following example reports obsolete backups and copies with a redundancy of 1
:
REPORT OBSOLETE; Report of obsolete backups and copies Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Backup Set 1 OCT 30 2001 15:54:56 Backup Piece 1 OCT 30 2001 15:54:56 /oracle/dbs/01d7t0t9_1_1 Archive Log 1 OCT 30 2001 04:52:17 /oracle/oradata/trgt/arch/archive1_21.dbf