Skip to Main Content
  • Questions
  • Lost all controlfiles and not having database tablespace and datafiles information to create a new control file

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Gera.

Asked: January 12, 2017 - 3:17 pm UTC

Last updated: January 13, 2017 - 7:12 am UTC

Version: 11g R2

Viewed 1000+ times

You Asked

Hello Tom/Maria/Team

We ran a bad task in a cron in linux which remove all files modified 1 day ago, the database was up&running but idle=>without use bc it is test db, then the task removed control files and spfile bc it was down but I started it up. This instance run Oracle APPS.

I could create a new spfile from memory using create spfile clausule.

But I don't have the database structure documented to build the control file using 'create control file ...' command/clausule. I don't have idea what datafiles can be included and what are the directories or paths where they are..

It is an important DB bc APPS for tests from time to time, but no backups and not archive mode, I don't need recover information bc database has 2 months without use.

I only need to put DB up and running again.. DB is Oracle 11g R2.

What do you recommend..?

Best Regards..





and Connor said...

There's possibly a chance you'll have a listing of the datafiles in either the alert log or in the trace file directory, especially if you've ever done a backup controlfile to trace command.

Otherwise, you need build a create controlfile command from scratch, which is loosely the following:

CREATE CONTROLFILE REUSE DATABASE xxx RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '...' SIZE 50M,
...
DATAFILE
'file1',
'file2',
...
CHARACTER SET xxx
;

Without any archives, you might then have to set some hidden parameters to allow the database to start without a proper recovery, and make any existing rollback segments offline. Some googling will reveal the parameters you're after :-)

After that, we would normally advise you take a datapump export of the database and use it to build a fresh one.



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.