Site icon An Oracle Spin by Alex Lima

How to find the tapes needed for restore if you are using RMAN catalog to write directly to tape?

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;


Exit mobile version