cancel
Showing results for 
Search instead for 
Did you mean: 

oracle dbid of source target

Lamont_Stratus
Level 3
hi,

there is a section on nbu for oracle sysad manual about the redirecting restores.

what would be the value of the "dbid of the source target"?

SVRMGR> startup nomount pfile=$ORACLE_HOME/dbs/inittest.ora
%rman rcvcat rman/rman@rcat
RMAN> set dbid= <<==THIS IS THE DBID OF THE SOURCE DB
RMAN> connect target/
RMAN>run {
RMAN> ALLOCATE CHANNEL CH00 TYPE’SBT_TAPE’;
RMAN> SEND ‘NB_ORA_SERV=lion, NB_ORA_CLIENT=camel’;
RMAN> restore controlfile
RMAN> }
SVRMGR> alter database mount;
%orapwd file=$ORACLE_HOME/dbs/orapwtest password=
%rman rcvcat rman/rman@RCVCAT
RMAN>set dbid= <<===???What would be the value of this, still the dbid of the source db???
RMAN>connect target/
RMAN>run {
RMAN> ALLOCATE CHANNEL CH00 TYPE ‘SBT_TAPE’;
RMAN> ALLOCATE CHANNEL CH01 TYPE ‘SBT_TAPE’;
RMAN> SEND ‘NB_ORA_SERV=lion, NB_ORA_CLIENT=camel’;
RMAN> restore database;
RMAN> restore archivelog all;
RMAN> }


I'm not much into oracle.....

Thanks.
-lamont
2 REPLIES 2

patrickkuah
Level 6
Every oracle database has a DBID (database ID). To know the source target (the database where you backup)

Example. From RMAN, type the following,

connect target oracle/******@db1 (replace with appropriate username, password and database name)

It will reply you the following....with the DBID.
Recovery Manager: Release 9.2.0.1.0 - 32bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: DB1 (DBID=1234567890)

To restore the database to another server, you have to set the DBID as the same as the server where you perform the backup In this case, DB1with DBID=1234567890.

patick :)

Lamont_Stratus
Level 3
thanks patrick,
for db restore to another server, the dbid should be the same as the source db. alternately the duplicate command can restore the db with unique dbid (totally an oracle thing)