Recovery Manager, or RMAN, can create useful lists and reports of backups and image copies. RMAN obtains the information from your metadata repository, either the control file or the recovery catalog. Use the report and list commands to determine what you have, or need to back up or copy. The information, which is available whether or not you use a recovery catalog, is extremely helpful in developing an effective backup strategy. The list command shows the contents of RMAN's metadata repository, all RMAN backups (both backup sets and proxy copies) and image copies. The report command performs a more detailed analysis. For example, it can generate a report on the datafiles that need a backup when the backup pieces are obsolete. The report command can list backup sets and datafile copies that can be deleted either because they are redundant or because they are unrecoverable. RMAN writes the output from these commands to the screen or to a log file. The list command queries the recovery catalog or control file and produces a record of its contents. Use it to list:
Backups of a specified list of datafiles
Image copies of a specified list of datafiles
Backups of any datafile that is a member of a specified list of tablespaces
Image copies of any datafile that is a member of a specified list of tablespaces
Backups of any archived redo logs with a specified name and/or within a specified range
Image copies of any archived redo log with a specified name and/or within a specified range
Incarnations of a specified database
RMAN Reports
RMAN reports are intended to provide analysis of your backup and recovery situation. An RMAN report can answer questions such as:
Which datafiles need a backup?
Which datafiles have not been backed up recently?
Which datafiles need to be backed up since less than n number of backups or copies are available?
Which backups and copies can be deleted?
Which datafiles are not recoverable because of unrecoverable operations performed on them?
What is the current physical schema of the database or what was it at some previous time?
Which backups are orphaned, that is, unusable within a restore operation, because they belong to incarnations of the database that are not direct predecessors of the current incarnation?
LIST BACKUP
Within Oracle, the output of the LIST BACKUP command is significantly improved. It now prints the list of backups belonging to a backup set. This is contained within a separate section of the report, from the list of data files or archived logs included within the backup set. A new command, REPORT NEED BACKUP REDUNDANCY, has been implemented. When fewer than a user-specified number of backups of a data file exist, this report alerts the user that a new backup is required. In the following simulation, we will connect to RMAN and run one LIST and REPORT command, and review the results displayed by it.
Writing Oracle LIST and REPORT Commands
You have connected to the RMAN command line by using RMAN as the User Name, RMAN as the Password, and BACKUP as the Host String. You have also connected to the target database. Now, issue a LIST command to display all the backups performed on the database. Then click Enter to continue.
RMAN now displays all the backups performed on the database. But what if there are obsolete backups? Press Enter to learn how to access that report.
Issue a REPORT command to display all the obsolete backups performed on the database, which can be deleted. Approve the entries.
RMAN now displays all the obsolete backups performed on the database, which can be deleted. This is the end of the simulation. Click Exit.
LIST Purpose
Use the LIST command to display backups and information about other objects recorded in the RMAN repository.
Additional Topics
Prerequisites
Usage Notes
Syntax
Semantics
LIST Command Output
Examples
Prerequisites
Execute LIST only at the RMAN prompt. Either of the following conditions must be met:
RMAN must be connected to a target database. If RMAN is not connected to a recovery catalog, and if you are not executing the LIST FAILURE command, then the target database must be mounted or open. If RMAN is connected to a recovery catalog, then the target database instance must be started.
RMAN must be connected to a recovery catalog and SET DBID must have been run.
Usage Notes for LIST command
Except for LIST FAILURE, the LIST command displays the backups and copies against which you can run CROSSCHECK and DELETE commands. The LIST FAILURE command displays failures against which you can run the ADVISE FAILURE and REPAIR FAILURE commands. "RMAN Backups in a Data Guard Environment" explains how RMAN handles backups in a Data Guard environment. In general, RMAN considers tape backups created on one database in the environment as accessible to all databases in the environment, whereas disk backups are accessible only to the database that created them. In a Data Guard environment, LIST displays those files that are accessible to the connected target database. RMAN prints the LIST output to either standard output or the message log, but not to both at the same time.
For REPORT commands, the following series of images lists some of the new commands for the LIST and REPORT feature within RMAN.