Databases Reference
In-Depth Information
Solution
You can determine the DBID of your target database in one of the following ways:
You can derive the DBID from an auto backup file.
You can retrieve the DBID from RMAN output.
If you've thought ahead, you can write the DBID periodically to a file such as the alert.log.
You can derive DBID from a file dump.
Deriving the DBID from an Auto Backup File
This solution works only when you're not using a FRA. When the auto backup of the control file is enabled and you're
not using a FRA, the format of the file created always includes the format variable %F when naming the file used for
the RMAN backup piece. The format of the %F variable is a unique combination of the database identifier, the date,
and a sequence, and it follows this format: c-IIIIIIIIII-YYYYMMDD-QQ, which includes the DBID embedded in the
IIIIIIIIII string. For example, if the control file backup piece name is c-2601506593-20060918-01, then the DBID
substring is 2601506593. Table 10-1 describes the meaning of each section of the %F format variable.
Table 10-1. Description of %F Format Variable
String
Meaning
c
Signifies a control file backup
IIIIIIIIII
DBID
YYYYMMDD
Date backup was created. Used by maxdays parameter of the restore controlfile command
QQ
A hex sequence number that is incremented each time a control file auto backup is created
for a given day. Used by the maxseq parameter of the restore controlfile command
If you've enabled the auto backup of the control file and haven't specified its location through either the
use of a FRA or a configured backup location, then the default location for a control file auto backup on
Linux/Unix systems is ORACLE_HOME/dbs, and on Windows platforms it's usually ORACLE_HOME\database. You
can inspect the file name and derive the DBID.
If you are using a FRA, then the control file will not contain the DBID as part of its name. When using a FRA, the
control file backup is named using the Oracle Managed File format.
Note
Retrieving the DBID from RMAN Output
Another method for identifying your DBID is to extract it from any RMAN session output that you have previously
saved to a log file. The output of an RMAN session will contain the DBID as displayed when you first connect to your
target database. For example:
RMAN> connect target /
connected to target database: O12C (DBID=3412777350)
 
 
Search WWH ::




Custom Search