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: corrupt datafile

Re: corrupt datafile

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Fri, 3 Jan 2003 22:50:45 +1000
Message-ID: <jyeR9.15710$jM5.43823@newsfeeds.bigpond.com>


"Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message news:ti5R9.1140$C01.91423998_at_newssvr17.news.prodigy.com...
> Howard J. Rogers wrote:
> > "Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message
> > news:954R9.1116$KM.90452994_at_newssvr17.news.prodigy.com...
> >
> >>ronia wrote:
> >>
> >>>Supose I have only a datafile data.dbf
> >>>I not have system.dbf, redologs.dbf temp.dbf etc.
> >>>
> >>>Are anyway to recover the data. At least manualy???
> >>>I heard that Oracle Consulting can do it.
> >>>
> >>
> >>Hmm. Bad situation. Yes, Oracle Consulting can do it ... they have a
> >>tool - actually from the developers - that can read a DBF file as though
> >>it were an ordinary O/S file and produce a SQL Loader CSV file. If you
> >>are ambitious enough, you could write a similar tool (but I suspect you
> >>need to retrieve the data right now ... not 6 months from now when you
> >>might finish coding the tool).
> >>
> >>I doubt the following will work (never tried it myself), but you might
> >>give it a go before spending the big money to bring in a Consultant:
> >>
> >>1. Place your data file (data.dbf) in the directory of another database
> >>(create one if you don't have another handy).
> >>
> >>2. Create a new tablespace in this other db that refers to data.dbf as
> >>its datafile. You might have to place it offline for now. If Oracle
> >>complains at this point, and you don't know what it's complaining about,
> >>call the Consultant.
> >>
> >>3. Bounce the database. At this point, I expect Oracle will complain
> >>about the datafile being out of sync with the control file. Perform a
> >>recovery and reset the control file (resetlogs). There will be nothing
> >>to recover for data.dbf in the redo logs on this other db.
> >>
> >>4. If the above fails, call Oracle support. In fact, I'd probably do
> >>that anyhow because they might have a solution that they can walk you
> >>thru that's more "correct" than my wild guess procedure.
> >
> >
> >
> > I like the idea behind your approach, but it isn't going to work. Whilst
you
> > might be able to fudge a datafile resynchronisation with a resetlogs in
this
> > way, the OP's data dictionary isn't going to know a thing about the
segments
> > within the datafile. So getting at the data is going to be impossible.
> >
> > So I'd leap straight to your step 4.
> >
> > Regards
> > HJR
> >
> >
> I was afraid someone with more knowledge was going to say that. Thanks
> for jumping in and correcting my wild guess!

Hi Karsten,

To add to what Howard has said, when you add a datafile to a database, you either add a "new file" which Oracle creates and to which Oracle spits the dummy if it already exists or you add an "existing file" (which I think is what you're suggesting) which you can most certainly can do with the reuse clause but unfortunately Oracle reformats the header in this case and effectively blows away the existing data.

You've successfully added the data file to the new database but lost all it's previous data.

To the OP, either attempt an incomplete recovery (providing you have a backup and archived redo logs) or do as Howard suggests and make use of your support fees.

Cheers

Richard Received on Fri Jan 03 2003 - 06:50:45 CST

Original text of this message

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