Retrieve DBID from an Oracle Netbackup..Or..”What’s The Number Again?”

Of course we make backups. Never ever things go wrong…But when they do..It goes south real fast real soon…One of the things easily overlooked is to note down the DBID of the database. Not needed on a daily basis, but at the time a recovery this is a crucial part of the restore. But where did we left this number?

There are of multiple ways of finding this out, but let’s say we only have the backup created with Netbackup. And we have of course(!!) backed up the control file either with the autobackup option “on” or manual.

The easy solution is to retrieve the control-file name from the backup list in the Netbackup catalog. The reason for this is simple, the default name format for an RMAN control-file autobackup is c-IIIIIIIIII-YYYYMMDD-QQ, where: IIIIIIIIII is the DBID.

Go to the server where the backup agent is installed, and find the command: bplist.

In this case it is located in:

/usr/openv/netbackup/bin/bplist

Fire off the following command:

/usr/openv/netbackup/bin/bplist -C client_name -t 4 -l -R /

e.g.: when the backup was created on the host Node1, this is the name you need to fill in at client_name.

This command will provide a list of the backup files, including the control-file:

-rw-rw---- oracle    dba          47972352 Nov 17 12:53 /c-1089834388-20151117-05
-rw-rw---- oracle    dba          47972352 Nov 17 12:52 /ctrl_dDUMMYDB01_uvbqmg5vk_s4075_p1_t896014324
-rw-rw---- oracle    dba          47972352 Nov 17 12:51 /c-1089834388-20151117-04
-rw-rw---- oracle    dba           9699328 Nov 17 12:50 /arch_dDUMMYDB01_uv9qmg5sb_s4073_p1_t896014219
-rw-rw---- oracle    dba          47972352 Nov 17 12:49 /c-1089834388-20151117-03
-rw-rw---- oracle    dba          16777216 Nov 17 12:48 /bk_dDUMMYDB01_uv7qmg5om_s4071_p1_t896014102
-rw-rw---- oracle    dba          47972352 Nov 17 10:09 /c-1089834388-20151117-02
-rw-rw---- oracle    dba          47972352 Nov 17 10:08 /ctrl_dDUMMYDB01_uv4qmfsd8_s4068_p1_t896004520
-rw-rw---- oracle    dba          47972352 Nov 17 10:07 /c-1089834388-20151117-01
-rw-rw---- oracle    dba          71565312 Nov 17 10:06 /arch_dDUMMYDB01_uv2qmfs9c_s4066_p1_t896004396
-rw-rw---- oracle    dba          47972352 Nov 17 10:05 /c-1089834388-20151117-00
-rw-rw---- oracle    dba         61254912K Nov 17 09:39 /bk_dDUMMYDB01_uv0qmfqlk_s4064_p1_t896002740

So now we now the DBID of this database: 1089834388.

Advertisements

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Databases, Technical Stuff and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s