The Rman List command is a way to query the historical information of a backup in a database control file or recovery directory. The list provides a set of information, including all the information from the list of database counterparts to the backup set and the backup list of the archive log.
1. List the corresponding objects
The list Incarnation command provides the user with a listing of each database counterpart for the target database. If necessary, you can use the information from this list to restore the database to a point in time before the last Resetlogs command is executed.
rman> list incarnation;
Replacing the recovery directory with the target database control file
Database Prototypes List
db keyword INC keyword DB name db ID STATUS reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1247395743 PARENT 1 February-April-10
2 2 ORCL 1247395743 PARENT 940976 2 January-May-10
3 3 ORCL 1247395743 orphan 8426617 June-July-10
4 4 ORCL 1247395743 current 8554968 June-July-10
The new column in Oracle 10g is status, which lists the state of the counterpart, which indicates that the counterpart is the corresponding object (parent), the current counterpart (present), and the orphaned counterpart (orphan, which is restored after the Resetlogs command).
Resetting the SCN and reset times (reset time) mainly describes the time that the database counterpart was created, which is why the first article reset SCN is 1. This column is useful for restoring with the resetlogs command and makes it easier to revert to the previous counterpart.
Note that there is a difference between using the recovery directory and not using the recovery catalog output. There are discrepancies on the INC Key.
2. List Backup
The list command provides a number of different options for reporting the status of database backups and replicas.
(1) Overview of available backups
Rman> list Backup summary;
Backup List
===============
Keywords TY LV S device Type complete time segment number of replicas compression mark
------- -- -- - ----------- ---------- ------- ------- ---------- ---
113 B F A sbt_tape 1 August-June -10 1 1 NO tag20100618t085926
138 B F A DISK 2 January-June -10 1 1 YES tag20100621t233122
219 B F A DISK 2 February-June -10 1 1 NO tag20100622t212749
231 B 1 A DISK 2 March-June -10 1 1 NO ORCL
1072 B F A DISK June-July -10 1 1 NO tag20100706t134705
In this example we can get the information:
Key (keyword): Represents the backup set key
The TY (type) and LV columns represent the backup type of the column:
B[backup] Represents a backup
F[full] Represents a full backup
A[archivelog]
0 and 1 represent incremental backups [incremental backup]
The S column describes the status of the backup: A indicates that available,x represents expired.
Device Type: Indicates whether the backup device is a tape or a disk
Most list commands can use summary parameters at the end, such as:
List Backup of database summary;
List expired Backup of Archivelog all summary;
List Backup of tablespace users summary;
(2) List backup by backup type
You can use the list backup by file command to list each backup set and backup set slice. It can be backed up by data files, archived log backups, control files, and SPFile file backups to list the backup information. Such as:
Rman> list backup by file;
Control file Backup List
============================
CF CKP SCN Ckp time BS keyword S segment number copy number compression mark
---------- ---------- ------- - ------- ------- ---------- ---
8625387 June-July -10 1072 A 1 1 NO tag20100706t134705
8555238 June-July -10 1000 A 1 1 NO tag20100706t091808