SQL Server recovers databases to a specified point in time

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

If the database is mistakenly deleted, the state of the data should be recovered in time before the error operation occurs.

Tools/Materials
    • SQL Server Management Studio
    • Database full backup and log backup
Required conditions
    1. 1

      Database Right-click Property, view data recovery mode as "full" in options

    2. 2

      Full data backup before data is mistakenly deleted

      END
Method/Step
    1.  

      When an error is deleted, record the deletion time, such as 16:23

    2.  

      Open SQL Server Management Studio and connect to the DB instance in all programs in the server

    3. Li class= "exp-content-list list-item-3" > 

      Select the database to be recovered, right-tasks-backup

    4.  

      The backup type in the pop-up dialog box select transaction log and add the backup file" Log.trn "

    5.  

      Click OK to complete the transaction log backup

    6.  

      Right-click "Tasks"-"restore"-"database"

    7.  

      Open the Database Restore page, check that the source and target databases are correct, check that the full and log backups are complete, and tap Timeline to enter the timeline selection

    8.  

      Select a specific date and time in the pop-up Timeline dialog box and set the time to the time before the error is deleted, such as 16:20

    9.  

      Check the target database again, and the backup set information is correct, click on the" Options "tab, tick" Overwrite existing database "and" Close existing connection "check box, and then OK until the restore succeeds

    10.  

SQL Server Recovery database to a specified point in time

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.