How to query the Oracle catalog database for VERITAS NetBackup (tm) media IDs
| Article:TECH23119 | | | Created: 2002-01-02 | | | Updated: 2005-01-10 | | | Article URL http://www.symantec.com/docs/TECH23119 |
Problem
How to query the Oracle catalog database for VERITAS NetBackup (tm) media IDs
Solution
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 8.1.6.0.0 - Production on Wed Dec 4 14:08:07 2002
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.0.0, 64 bit - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - 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;
HANDLE MEDIA TO_CHAR(START_TIME, TO_CHAR(COMPLETION_TIME
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 8.1.6.0.0 - Production on Wed Dec 4 14:08:07 2002
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.0.0, 64 bit - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - 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;
HANDLE MEDIA TO_CHAR(START_TIME, TO_CHAR(COMPLETION_TIME
--------------------------------------------------------------------------------------------------------------
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
252312
Article URL http://www.symantec.com/docs/TECH23119
Terms of use for this information are found in Legal Notices









Thank you.