How to restore a table in SQL server 2000

  • Hello,

    Today, I accidently delete all the data from a table. I was wondering is it possible to restore a table's data from the transaction log. I don't want to restore from last night backup.

    I just need to restore the data for one table. I hope someone can give me some assistance on this. Thank you in advance for your help.

  • Assuming the database is useing Full Recovery model, back up the t-log right now.  Restore last night's full backup with a new database name, restore all log backups taken during the day including the one you just took.  Copy the restored table back to the original database.

    Greg

    Greg

  • Calvin:

    > I don't want to restore from last night backup.

      Unfortunately, that's what you have to do.  When restoring the log backups, use the STOPAT switch and specify a time before you deleted the data.

    Greg:  If he restores all the logs backups through current, he will also restore (and re-perform) the delete he's trying to recover from.

    -Eddie

    Eddie Wuerch
    MCM: SQL

  • You're right, Eddie.  I should have advised him to us STOPAT to restore to a time before the delete.  Thanks for catching that.  Good thing I'm not the only one reading this thread!

    Greg

     

    Greg

  • Thanks so much for everyone's help. I was able to restore the data back to the table. The point in time restore works really well. This is the first time i ever restore using point in time. I will keep this in mind for future reference. Thanks again, you guys save my day. take care and hope everyone have a good weekend ahead.

    Calvin

  • I assume you restored to a different DB name so as not to affect the other data in your live DB ?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply