DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Cannot get back deleted records when I restore datafile

  1. #1
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    59

    Question Cannot get back deleted records when I restore datafile

    Here is my scenario:

    My datafile(df1.dbf) has one table 'test' consists of the following:
    Name Age
    ---- ---
    Richard 38
    Annie 25

    1. I did a manual operating system file copy of df1.dbf to c:\temp
    2. I delete the 2 records and committed
    3. I shutdown the DB
    4. Delete the existing df1.dbf and copy back the df1.dbf from c:\temp
    5. startup mount
    6. recover database
    7. alter database open
    8. Check on the table 'test' but it was empty.

    Why is it so? I have backup the datafile before I delete the records.
    Please help. Tks.

  2. #2
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    Where do you think that...

    delete * from test;

    get's recorded?

    somewhere right?
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  3. #3
    Join Date
    May 2003
    Location
    Kathmandu, Nepal
    Posts
    16
    Have you backed up (copied) your datafile df1.dbf in shutdown state or the state when the related tablespace was offline?
    I think are doing point in time recovery, it tries to recover uptil the delete. At the time of startup, the instance takes the help of redo log file. It goes for rollforward and rollbackward. So you still loose the data.
    Raj Kishore
    Oracle DBA

  4. #4
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    59
    So I need to use 'recover database until....' ?

  5. #5
    Join Date
    Jan 2001
    Posts
    2,828
    Originally posted by richyip
    So I need to use 'recover database until....' ?
    You bet :-)

    regards
    Hrishy

  6. #6
    Join Date
    Nov 2001
    Posts
    335
    You can not use recover until because you only backed up one datafile . You MUST to backup entire database in order to go "back in time"
    One, who thinks that the other one who thinks that know and does not know, does not know either!

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by BV1963
    You can not use recover until because you only backed up one datafile . You MUST to backup entire database in order to go "back in time"
    I concurr. Your goal is to get your database to timepoint Y. You would backup your ENTIRE database at timepoint X. You could then roll your database forward to timepoint Y using the archived redo logs.

    However, you have backed up your datafile at timepoint X and not your entire database. The rest of your datafiles are at timepoint Z. When you try to recover you will either recover to timepoint Z or you will get an error message stating that file #1 needs more recovery.
    Jeff Hunter

  8. #8
    Join Date
    May 2003
    Location
    paris, FRANCE
    Posts
    2
    or insert
    alter system switch logfile;
    between step 2 and 3

  9. #9
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by dali
    or insert
    alter system switch logfile;
    between step 2 and 3

    ???

    You would have the same problem.
    Jeff Hunter

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