How to query the Oracle catalog database for VERITAS NetBackup (tm) media IDs

Article:TECH23119  |  Created: 2002-01-02  |  Updated: 2013-10-23  |  Article URL
Article Type
Technical Solution



How to query the Oracle catalog database for VERITAS NetBackup (tm) media IDs


If an Oracle Recovery Manager catalog database is used to catalog the Oracle Recovery Manager (RMAN) backups, it can be queried using Oracle Sql*Plus to find the media IDs of the tape volumes that contain a specific backup.

An example follows:

Set the ORACLE_SID variable to the SID of the catalog database. As the catalog owner, connect to the catalog database using sqlplus.

$ sqlplus rman/password@CATDB

SQL*Plus: Release - Production on Wed Dec 4 14:08:07 2002

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

Connected to:
Oracle8i Enterprise Edition Release, 64 bit - Production
With the Partitioning option
JServer Release - Production

SQL> select handle, media from rc_backup_piece;

HANDLE                        MEDIA
al_26_1_463148761     A00001                                                                          
al_29_1_463150719     A00001                                                                          
cntrl_30_1_463150776  A00001                                                                          
al_33_1_463249436     A00001
cntrl_34_1_463249503  A00001                                                                          
al_36_1_463250571     A00001                                                                                    
al_38_1_46325159      A00001                                                                          
al_39_1_463322975     A00001                                                                          

8 rows selected.

SQL> select handle, media, to_char(start_time,'mm-dd-yyyy hh:mm:ss'), to_char(completion_time,'mm-dd-yyyy hh:mm:ss') from rc_backup_piece;


al_26_1_463148761     A00001           05-29-2002 12:05:02 05-29-2002 12:05:54  
al_29_1_463150719     A00001           05-29-2002 12:05:40 05-29-2002 12:05:31
cntrl_30_1_463150776  A00001           05-29-2002 12:05:36 05-29-2002 01:05:27
al_33_1_463249436     A00001           05-30-2002 04:05:57 05-30-2002 04:05:53
cntrl_34_1_463249503  A00001           05-30-2002 04:05:04 05-30-2002 04:05:55
al_36_1_463250571     A00001           05-30-2002 04:05:52 05-30-2002 04:05:49
al_38_1_46325159      A00001           05-30-2002 04:05:57 05-30-2002 05:05:48
al_39_1_463322975     A00001           05-31-2002 12:05:36 05-31-2002 12:05:23

8 rows selected.

Related note:

If the backup piece spans more than one tape,  the RMAN catalog database will only have an entry for the first tape. If you wish to know what the subsequent tape volume is for a backup piece,  you can use the VERITAS NetBackup (tm) bpimagelist command.

/usr/openv/netbackup/bin/admincmd/bpimagelist -d mm/dd/yy hh:mm:ss -e mm/dd/yy hh:mm:ss  -client  client name -M  NBU master server name -preview

One or more media IDs which were written between the start and end dates supplied in the -d and -e arguments are returned.

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices