This article is a bit different from other recovery and backup case studies. The solution to this scenario has given by my fellow DBA Sham. Being a DBA we all are must aware of some different conditions that can occur in different conditions.

In this post, we are going to learn about the steps which we use to recover database when we don’t have the knowledge of DBID and DBNAME. As we know what is DBID and DBNAME in Oracle for new DBA we have mentioned about the technical definition of DBID and DBNAME.

DBID stands for database identifier, which is a unique identifier for each Oracle database running. It is found in control files as well as datafile header.

DBNAME stands for the database name.

Let’s start Recover the Database using RMAN Backup without having DBID or DBName

I have RMAN backup set under /u02/bkp directory, but nothing I have about these BACKUP SETS. I am trying to find the way to recover the database from these backup sets.
Let’s simulate the scenario step by step.

we have already orcldb Instance is running on the Server. This SID of orcldb is useful only to connect to the rman utility.

Finally, I found the DB_NAME and DBID. Database name is TESCO and DBID is 298331064. Now I am going to recover the database using minimum parameters.

Now export the ORACLE_SID and nomount the database.

Now we can restore the controlfile from backup.

As we got the above error of AUTOBACKUP, we need to try restore control file from availabale backup sets one by one.

Successfully we have restored controlfile from the backup. Control file has been restored $ORACLE_HOME/dbs, Later we will relocate this control file. Now controlfile is available so that we can MOUNT the Database Instance.

RMAN does NOT aware about these backup sets so that we need to register these RMAN backup files to the controlfile using following RMAN CATALOG command.

Now we can restore the database.

Here RMAN is trying to restore datafiles but path is NOT available on the TARGET Server.Create appropriate directory on the Target Server.

Now I am trying to execute same command. Let’s see ..

Wow, something looks good! Now easily we can do recovery!

Nothing we can ignore above warning because is asking to supply SEQUENCE 6! In our case we have recovered up to 5 th SEQUENCE. Now we can open the database in resetlog.

Now we can restrore the spfile from backup

Now we can read the spfile to make directory structure

Create required directory structure

Shutdown the database

Existing controlfile in $ORACLE_HOME/dbs

Restoring the controlfile as per SPFILE

Simply startup the Database Instance!

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: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Comments

  1. Jai Khare

    After mounting the db we can simply check v$datafile,v$logfile views to get previous locations of datafiles & logfiles to create directory structure before trying the restoring of datafiles.And why didn’t u restore spfile earlier before controlfile because if you restore spfile before controlfile then u could nomount db with that spfile & get value of value of parameter control_files,create directory structure & then simple restore controlfile.Otherwise as in ur case it was restored in dbs location and u had to do additional steps later to restore controlfile in original
    location

  2. Pingback: How to recover database without knowing DBID or DB Name - SSWUG.ORG

Leave a Reply