Oracle Database identifier in short DBID is an internal, unique identifier for an Oracle database. Database administrator must note down the DBID in safe place, so that any miss-happening to the database could be easily identified and recovered. In case it is required to recover SPFILE or control file from autobackup, such as disaster recovery, you will need to set DBID. So lets see how to get DBID in NOMOUNT State.
Why DBID is important? 
  • It is an unique identifier for a database.
  • In case of backup and recovery RMAN distinguishes databases by DBID.
  • When DBID of a database is changed, all previous backups and archived logs of the database become unusable.
  • After you change the DBID, you must open the database with the RESETLOGS option, which re-creates the online redo logs and resets their log sequence to 1
  • You should make a backup of the whole database immediately after changing the DBID.

Let’s take an example of getting it in nomount state:

First shut down the database using shut immediate command

Now startup database in nomount state

You can also set tracefile identifier for easily identification of tracefile.

Now, dump first ten block of datafile, because each block header contains dbid information.

Now find the location of Trace file.

Now search for Db ID inside the trace file. In Linux you can use cat command with grep to find it:

Here you can see the dump here:

In simple you can also get it using v$database:

DBID is also displayed by the RMAN client when it starts up and connects to your database. Typical output follows:

Thank you for giving your valuable time to read the above information.


If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn:

Anuradha’s LinkedIn:

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.