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

Thread: How to restore the records from the backup

  1. #1
    Join Date
    Feb 2003
    Posts
    12

    How to restore the records from the backup

    Hi,
    We are taking hot backup of the oracle 9i database daily.Which is running in archive log mode. Accidentaly one person deleted some records in one of the table. But this deletion information is reported to us after a days time. How to restore the records from the backup.

    Once in a week we take cold backup.

    1.Is it possible to restore that particuar table with the deleted records. If possible? How to do it.

    In order to fix this type of scenario what precations should be taken at the database level.

    Thanks,

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    If on 9i you can use Oracle Flashback Query. But ofcourse your UNDO_RETENTION and UNDO_TABLESPACE should be big enough to still have previous day data.
    Exports are pretty useful in such scenarios. Otherwise TSPITR and re-enter the data thereafter.
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    I gues using LogMiner would be the fastest choice here if you know the approximate time when the deletes were performed.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Feb 2003
    Posts
    12
    Hi,

    I am not using logminer in my database. If so how do i take the data back from the database. The logminer just records all the activity(insert,delete,update etc...)on the database. How do i get the data?

    Query
    execute DBMS_LOGMNR.START_LOGMNR(dictfilename => ‘c:\logminer\dictionary.ora’, starttime=>to_date(‘04062003’,’ddmmyy’) ,endtime=> to_date(‘0406003’,’ddmmyy’));

    Thanks,

  5. #5
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    laydown the backup and roll forward to the point in time before the failure (user). Then export the desired records or do something like insert as select over a db link.

    Investigate tablespace point in time recovery and transportable tablespaces for ways to accomplish this.

    steve
    I'm stmontgo and I approve of this message

  6. #6
    Join Date
    Oct 2000
    Posts
    467
    You can clone..basically restore your old backups and recover probably on a different host, using arch logs until time you deleted the table records. Once you complete this, take an export and import into prod.
    Vinit

  7. #7
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by D.Ramesh
    The logminer just records all the activity(insert,delete,update etc...)on the database. How do i get the data?
    No, the logminer does not record all the changes on the database, your archived logs allready contain all that activities. Logminer only analyze the archived logs and construct the DML statements that have been executed. And as it can reconstruct the DML statements, it is also able to construct the opposite DML statements that will "undo" the changes recorded in the log files. So if you know your deletes were executed between time1 and time2, analyze the archlogs that were generated during that period - and you will be able to get INSERT statement that will be exactly the opposite of the DELETES.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

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