Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to add existing datafiles to database?

Re: how to add existing datafiles to database?

From: Howard J. Rogers <howardjr_at_www.com>
Date: Fri, 7 Sep 2001 10:38:04 +1000
Message-ID: <3b9815f2@news.iprimus.com.au>

"inna" <mednyk_at_hotmail.com> wrote in message news:347a408b.0109061249.6839bff8_at_posting.google.com...
> Hi, This is my question:
> The server where Oracle 8.0 was installed , crushed .
> I have to reinstall Oracle. But I have still Ora_home\database folder
> where I have datafiles of old databases, I have backup of pfile , but
> I am not sure about .ctl file if I have it good.
> Is it possible after I install Oracle on another drive, to recover
> those databases, datafiles of which I have. If Yes How?
> Thank you.

Yes, you can do it, though life will be much, much easier if the directory layouts can remain exactly as before.

Just re-install Oracle, re-set all your environment variables (ORACLE_SID, ORACLE_HOME etc), and you should simply then be able to say 'startup' in server manager. Recovery might be needed, but that will either happen automatically without even being noticed, or you'll be prompted to apply redo from archive logs (and I assume they are still available?)

Your problem might well be the control file, however, in which case you'd best research the 'create controlfile' SQL syntax... you'll have to startup nomount first, then issue that command. It can get tricky if you had read only tablespaces, but otherwise, it will recreate a functional controlfile from scratch. The syntax can be awkward to construct from scratch, because it must include a pointer (ie, path and file name) to every data file and redo log that used to exist.

And this is yet another reason why anyone who isn't doing an 'alter database backup controlfile to trace' every night wants their heads examined... it produces a text file output that *is* the SQL syntax, with all the right paths to your datafiles and redo logs built in. There's never a question about whether it's 'right' or not (I assume you're referring to whether it's consistent and useable or not?), because it's just a text file.

Before you start doing any attempts at startup, I strongly suggest you take a complete backup of every data file and redo log you've got. At least that way you can restore and try again if anything goes horribly wrong.

Regards
HJR Received on Thu Sep 06 2001 - 19:38:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US