If you are using the RMAN and using the RMAN catalog to write directly to tape you can use the following query to find the tapes needed to restore or the tapes that were used.
# The following example find the tapes used to backup b/w 10-Jun-2008 4:00 AM and 11-Jun-2008 4:00 AM by specifying the database name or DB ID
$ sqlplus rmancatalog/rmancatalog
SQL> select distinct p.MEDIA
from rc_backup_piece p, rc_database d
where d.NAME = ‘TEMP’
— OR d.dbid = 3903930932
and p.COMPLETION_TIME >= TO_DATE(’10-JUN-2008 04:00′, ‘DD-MON-YYYY HH24:MI’)
and p.COMPLETION_TIME <= TO_DATE(’11-JUN-2008 04:00′, ‘DD-MON-YYYY HH24:MI’)
and p.db_id = d.dbid;
MEDIA
———
A00635
A00999
You must log in to post a comment.