There are two required conditions to recover directly from an SQL statement:
First, the database after the creation of a complete backup;
Second, the Database recovery model (Recovery mode) is "full".
Recovery steps:
1. BACKUP LOG [DataBase] to disk= N ' D:\testlog ' with NORECOVERY
Back up the current log and make sure to back up the current log in case of mis-operation
2, RESTORE database [Database] from DISK = ' d:\test ' with NORECOVERY, REPLACE
Restore the database to the previous full backup record, such as fear of problems, you can create a new database to restore
3.RESTORE LOG [DataBase] from DISK = ' d:\testlog ' with stopat= ' 2:12am ', nounload, STATS = ten
Restore the current log to the database
Note:
(1), such as in the first step operation when prompted to not exclusive database, you can first separate the database, and then attach the OK;
(2), can be obtained by the print GetDate () to get the time format, this problem has made me n long ....
(3), such as after the recovery of the database has been in the restore state, you can execute the following command
RESTORE database [DB name] with RECOVERY
Next try to recover through the software, find more free methods, be prepared!
SQL Error Operation Recovery Experiment