DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Recovering data from a copy of a datafile

  1. #1
    Join Date
    Sep 2006
    Location
    Sundsvall, Sweden
    Posts
    5

    Recovering data from a copy of a datafile

    The database wouldnt start up due to an error in a datafile so before I made a recovery I made a copy of all my datafiles, controlfiles... Note that I didn't do an export just an filesystem copy.

    This was after a weekend with lots of changes in one of the datafiles which now after the recovery misses a lot of data.

    I tried to copy the newer xxx.DBF file to the original location but Oracle gives me an error saying that the datafile or control file is created before last resetlogs.

    So my question: Is it possible to retrieve the data from the datafile that contains all the new data or am I i trouble?

    The datafile contains 1 tablespace and that tablespace ony uses 1 datafile.

    BR
    Fredrik

  2. #2
    Please detail what recovery procedures you executed. A complete recovery should not result in the loss of any data.

    You may have to restore the backups of all the files you took in order to re-perform the recovery procedure.

  3. #3
    Join Date
    Sep 2006
    Location
    Sundsvall, Sweden
    Posts
    5
    Well... The problem is that I only had a cold backup about a month old and since the database prior last weekend has been almost idle I turned off the backupjobs and archiveing. Stupid I know but here I am...

    So if I have a copy of a newer datafile containing 1 tablespace can I get Oracle to accept the datafile?

    /Fredrik

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    Can you spool out the eaxct commands used and the resulting error message(s)? It is a little difficult to help based on what you have said.
    Assistance is Futile...

  5. #5
    Join Date
    Jun 2006
    Posts
    259
    I can "extract" the data from the raw data file...
    Of course a minor fee would be involved to cover my time. You may PM me if your interested.

  6. #6
    Join Date
    Sep 2006
    Location
    Sundsvall, Sweden
    Posts
    5
    Ok. Forget that part about getting the data back from the datafile. It's gone.

    Let's try to fix it in another way! I have AUTOBACKUPs and BACKUPSETs from 2006-08-16 to 2006-08-29 they ran nightly at 2 AM. But I have no idea how to use them and at the moment I'm very tired of trying to figure things out before asking questions.

    With all those files, in my oracle dreamworld, it should be possible to get the database back where it was 2006-08-29. Why do I otherwise have autobackups and backupsets?

    I really appreciate your help! And yes at the moment I'm a bit grumpy but it's because I'm angry at my self... :-(

    BR
    Fredrik

  7. #7
    RMAN backups you mean? Sounds like you want the Oracle® Database Backup and Recovery Quick Start Guide

  8. #8
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    From the limited information provided it sounds as though (depending on the database version) you can't recover using this backupset as it was created in a different incarnation of the database (you have done a resetlogs since that backup). So I ask again:

    Quote Originally Posted by waitecj
    Can you spool out the exact commands used and the resulting error message(s)? It is a little difficult to help based on what you have said.
    Assistance is Futile...

  9. #9
    Join Date
    Sep 2006
    Location
    Sundsvall, Sweden
    Posts
    5
    Quote Originally Posted by waitecj
    Can you spool out the eaxct commands used and the resulting error message(s)? It is a little difficult to help based on what you have said.
    Honestly, no...

    What happened was this:
    The database can't be opnened, because a datafile needs media recovery. So I make a copy of all my oracle files and starts a database recovery, not just the affected datafile. After recovery I copy the datafile with all the new data from backuplocation to original location. Of course that doesn't work but I didn't know that before all this... Then I learn that I just could have done a offline drop on the datafile that needed media recovery, it was the Example01.dbf so I obviously didn't need it either. Ok, so I put all the files I copied earlier back to where they belong but the db won't come up. I messed something up with the files and from there I kind of lost track of what I was doing, not that I knew much before either but...

    So I have a cold backup I can't use and a database that won't start and I can't recover either because of wrong incarnation. BUT I have a bunch of backup files stretching from first backup ever made on 16 August to last backup made on August 29.

    I haven't written any RMAN scripts my self. Everything was made through the enterprise manager, scheduling backups, archivelogs and so on.

    So if I can restore the controlfiles from the previous incarnation, restore the datafiles and finally I should be able to recover from that? Right?

    BR
    Fredrik

  10. #10
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    if i was you I would contact Oracle support and get them to walk you through what you need to do. Needs to be a more interactive process than a foum can provide

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width