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
Database Right-click Property, view data recovery mode as "full" in options
- 2
Full data backup before data is mistakenly deleted
END
Method/Step
-  
When an error is deleted, record the deletion time, such as 16:23
-  
Open SQL Server Management Studio and connect to the DB instance in all programs in the server
Li class= "exp-content-list list-item-3" > 
Select the database to be recovered, right-tasks-backup
-  
The backup type in the pop-up dialog box select transaction log and add the backup file" Log.trn "
-  
Click OK to complete the transaction log backup
-  
Right-click "Tasks"-"restore"-"database"
-  
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
-  
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
-  
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
-
SQL Server Recovery database to a specified point in time