Oracle® Database Backup and Recovery Basics 10g Release 2 (10.2) Part Number B14192-02 |
|
|
View PDF |
The LIST
command uses the information in the RMAN repository to provide lists of backups, archived logs, and database incarnations. You can use the output of LIST
to identify specific backups you wish to use with other RMAN commands.
This section contains these topics:
You can control how the output is displayed by using the BY
BACKUP
and BY
FILE
options of the LIST
command and choosing between the SUMMARY
and VERBOSE
options.
The primary purpose of the LIST
command is to determine which backups are available. For example, you can list:
Backups and proxy copies of a database, tablespace, datafile, archived redo log, or control file
Backups that have expired
Backups restricted by time, path name, device type, tag, or recoverability
Incarnations of a database
Note that the V$BACKUP_FILES
also contains list information for backups.
By default, RMAN lists backups by backup, which means that it serially lists each backup or proxy copy and then identifies the files included in the backup. You can also list backups by file.
By default, RMAN lists in verbose mode. You can also list backups in a summary mode if the verbose mode generates too much output.
To list backups by backup, connect to the target database and recovery catalog (if you use one), and then execute the LIST
BACKUP
command. Specify the desired objects with the listObjList
clause. For example, you can enter:
LIST BACKUP; # lists backup sets, image copies, and proxy copies LIST BACKUPSET; # lists only backup sets and proxy copies LIST COPY; # lists only disk copies
Optionally, specify EXPIRED
to identify backups not found during a crosscheck:
LIST EXPIRED BACKUP;
Examine the output (refer to Oracle Database Backup and Recovery Reference for an explanation of the various column headings in the LIST
output). Sample output of LIST BACKUP
follows:
List ofCHANGE, CROSSCHECK, and DELETE Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 7 136M DISK 00:00:20 04-NOV-03 BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20031104T200759 Piece Name: /oracle/work/RDBMS/backupset/2003_11_04/o1_mf_annnn_TAG20031104T200759_ztjxx3k8_.bkp List of Archived Logs in backup set 7 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 1 173832 21-OCT-03 174750 21-OCT-03 1 2 174750 21-OCT-03 174755 21-OCT-03 1 3 174755 21-OCT-03 174758 21-OCT-03 1 37 533321 01-NOV-03 575472 03-NOV-03 1 38 575472 03-NOV-03 617944 04-NOV-03 1 39 617944 04-NOV-03 631495 04-NOV-03 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 8 Full 2M DISK 00:00:01 04-NOV-03 BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20031104T200829 Piece Name: /ade/lashdown_rdbms/oracle/dbs/c-774627068-20031104-01 Controlfile Included: Ckp SCN: 631510 Ckp time: 04-NOV-03 SPFILE Included: Modification time: 21-OCT-03
Sample output of LIST COPY follows:
List of Archived Log Copies Key Thrd Seq S Low Time Name ------- ---- ------- - --------- ---- 37 1 37 A 01-NOV-03 /oracle/work/RDBMS/archivelog/2003_11_03/o1_mf_1_37_ztd4hl5d_.arc 38 1 38 A 03-NOV-03 /oracle/work/RDBMS/archivelog/2003_11_04/o1_mf_1_38_zthvg168_.arc 39 1 39 A 04-NOV-03 /oracle/work/RDBMS/archivelog/2003_11_04/o1_mf_1_39_ztjxwxwy_.arc
Specify the desired objects with the listObjList
or recordSpec
clause (refer to Oracle Database Backup and Recovery Reference). If you do not specify an object, then RMAN displays copies of all database files and archived logs. By default, RMAN lists in verbose mode, which means that it provides extensive, multiline information.
To list backups by file, connect the RMAN client to the target database and recovery catalog (if you use one), and then execute LIST
with the BY
FILE
option, specifying the desired objects to list and options.For example, you can enter:
LIST BACKUP BY FILE; # shows backup sets, proxy copies, and image copies LIST COPY BY FILE; # shows only disk copies
For another example, you could specify the EXPIRED
option to identify backups not found during a crosscheck:
LIST EXPIRED BACKUP BY FILE;
Examine the output (refer to Oracle Database Backup and Recovery Reference for an explanation of the various column headings in the LIST
output). Sample output follows:
List of Datafile Backups ======================== File Key TY LV S Ckp SCN Ckp Time #Pieces #Copies Compressed Tag ---- ------- - -- - ---------- --------- ------- ------- ---------- --- 1 5 B F A 631092 04-NOV-03 1 1 YES TAG20031104T195949 2 B F A 175337 21-OCT-03 1 1 NO TAG20031021T094513 2 5 B F A 631092 04-NOV-03 1 1 YES TAG20031104T195949 2 B F A 175337 21-OCT-03 1 1 NO TAG20031021T094513 ... some rows omitted List of Archived Log Backups ============================ Thrd Seq Low SCN Low Time BS Key S #Pieces #Copies Compressed Tag ---- ------- ---------- --------- ------- - ------- ------- ---------- --- 1 1 173832 21-OCT-03 7 A 1 1 NO TAG20031104T200759 1 A 1 1 NO TAG20031021T094505 1 2 174750 21-OCT-03 7 A 1 1 NO TAG20031104T200759 1 A 1 1 NO TAG20031021T094505 ... some rows omitted 1 38 575472 03-NOV-03 7 A 1 1 NO TAG20031104T200759 1 39 617944 04-NOV-03 7 A 1 1 NO TAG20031104T200759 List of Controlfile Backups =========================== CF Ckp SCN Ckp Time BS Key S #Pieces #Copies Compressed Tag ---------- --------- ------- - ------- ------- ---------- --- 631510 04-NOV-03 8 A 1 1 NO TAG20031104T200829 631205 04-NOV-03 6 A 1 1 NO TAG20031104T200432 175380 21-OCT-03 4 A 1 1 NO TAG20031021T094639 List of SPFILE Backups ====================== Modification Time BS Key S #Pieces #Copies Compressed Tag ----------------- ------- - ------- ------- ---------- --- 21-OCT-03 8 A 1 1 NO TAG20031104T200829 21-OCT-03 6 A 1 1 NO TAG20031104T200432
By default the LIST
output is detailed, but you can also specify that RMAN display the output in summarized form. Specify the desired objects with the listObjectList
or recordSpec
clause. If you do not specify an object, then LIST
BACKUP
displays all backups.
After connecting to the target database and recovery catalog (if you use one), execute LIST
BACKUP
, specifying the desired objects and options. For example:
LIST BACKUP SUMMARY; # lists backup sets, proxy copies, and disk copies
You can also specify the EXPIRED
keyword to identify those backups that were not found during a crosscheck:
LIST EXPIRED BACKUP SUMMARY;
Sample output follows:
List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 1 B A A SBT_TAPE 21-OCT-03 1 1 NO TAG20031021T094505 2 B F A SBT_TAPE 21-OCT-03 1 1 NO TAG20031021T094513 3 B A A SBT_TAPE 21-OCT-03 1 1 NO TAG20031021T094624 4 B F A SBT_TAPE 21-OCT-03 1 1 NO TAG20031021T094639 5 B F A DISK 04-NOV-03 1 1 YES TAG20031104T195949 6 B F A DISK 04-NOV-03 1 1 NO TAG20031104T200432 7 B A A DISK 04-NOV-03 1 1 NO TAG20031104T200759 8 B F A DISK 04-NOV-03 1 1 NO TAG20031104T200829
Refer to Oracle Database Backup and Recovery Reference for an explanation of the various column headings in the LIST
output.
You can specify several different conditions to narrow your LIST
output.
After connecting to the target database and recovery catalog (if you use one), execute LIST
COPY
or LIST
BACKUP
with the listObjList
or recordSpec
condition. For example, enter any of the following commands:
# lists backups of all files in database LIST BACKUP OF DATABASE; # lists copy of specified datafile LIST COPY OF DATAFILE 'ora_home/oradata/trgt/system01.dbf'; # lists specified backup set LIST BACKUPSET 213; # lists datafile copy LIST DATAFILECOPY '/tmp/tools01.dbf';
You can also restrict the search by specifying the maintQualifier
or RECOVERABLE
clause. For example, enter:
# specify a backup set by tag LIST BACKUPSET TAG 'weekly_full_db_backup'; # specify a backup or copy by device type LIST COPY OF DATAFILE 'ora_home/oradata/trgt/system01.dbf' DEVICE TYPE sbt; # specify a backup by directory or path LIST BACKUP LIKE '/tmp/%'; # specify a backup or copy by a range of completion dates LIST COPY OF DATAFILE 2 COMPLETED BETWEEN '10-DEC-2002' AND '17-DEC-2002'; # specify logs backed up at least twice to tape LIST ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
The output depends upon the options you pass to the LIST command. For example, the following lists copies of datafile 1
:
RMAN> list backup of datafile 1; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 2 Full 230M SBT_TAPE 00:00:49 21-OCT-03 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20031021T094513 Handle: 02f4eatc_1_1 Media: /smrdir List of Datafiles in backup set 2 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 175337 21-OCT-03 /oracle/dbs/tbs_01.f BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 5 Full 233M DISK 00:04:30 04-NOV-03 BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20031104T195949 Piece Name: /oracle/work/RDBMS/backupset/2003_11_04/o1_mf_nnndf_TAG20031104T195949_ztjxfvgz_.bkp List of Datafiles in backup set 5 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 631092 04-NOV-03 /ade/lashdown_rdbms/oracle/dbs/tbs_01.f
See Also:
|
Each time an OPEN
RESETLOGS
operation is performed on a database, this operation creates a new incarnation of the database. Database incarnations and their effect upon database recovery with RMAN are explained in more detail in Oracle Database Backup and Recovery Advanced User's Guide.
When performing incremental backups, RMAN can use a backup from a previous incarnation or the current incarnation as a basis for subsequent incremental backups. When performing restore and recovery, RMAN can use backups from a previous incarnation in restore and recovery operations just as it would use backups from the current incarnation, as long as all archived logs are available.
Use the LIST
INCARNATION
command to see the incarnations of your database.
To list database incarnations:
After connecting to the target database and the recovery catalog if applicable, run LIST
INCARNATION
:
RMAN> LIST INCARNATION;
If you are using a recovery catalog, and if you register multiple target databases in the same catalog, then you can distinguish them by using the OF
DATABASE
option:
RMAN> LIST INCARNATION OF DATABASE prod3;
Refer to Oracle Database Backup and Recovery Reference for an explanation of the various column headings in the LIST
output). Sample output follows:
RMAN> LIST INCARNATION OF DATABASE; List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time ------- ------- -------- ---------------- ------ ---------- ---------- 1 1 RDBMS 774627068 PARENT 1 21-OCT-03 2 2 RDBMS 774627068 CURRENT 173832 21-OCT-03
The preceding output indicates that a RESETLOGS
was performed on database trgt
at SCN 164378, resulting in a new incarnation. The incarnation is distinguished by incarnation key (represented in the Inc Key
column).