SQL Server data deletion reply

Source: Internet
Author: User

0.14 million records in the task table were accidentally deleted yesterday!

I tried two tools, but I still couldn't find them back. I rolled back to the backup last week. This week's things were gone.

 

The prerequisite for restoring by tools is the full recovery log, which is a simple log set to save space.

 

Therefore, backup is important. There is a recovery method that is good:

 

If you have any full backups prior to the drop table and the database recovery model is full or bulk logged, the It is pretty easy to restore the table.

1. Backup the transaction log.
2. Create a new database.
3. With SSMs, right click the new database and tasks-> restore-> Database
4. Select "from database:" and choose the original database.
5. Select a date and time prior to the drop table in "to a point in time"
6. On the "options" Page change the filename in "Restore as" to the new temporary database and check "overwrite the existing database"
7. Click OK.

When the restore is done, the database might be displayed with "restoring" in SSMs. To fix this execute the following in a query window:

Code:
restore database newdbname with recovery
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.