There may be many friends who have encountered such problems:
UPDATE or DELETE statement forgot to bring the WHERE clause, or the WHERE clause accuracy is insufficient, and after execution, the data recovery can only be done with the backup of the transaction log, so if your SQL is not performed The full storage backup or the backup log (Truncate Log On CHECKPOINT option is 1), then the data is not allowed to recover, or can only be restored to the most recent backup data.
The following brief description of the recovery data method: 1. If there is a full storage backup (or have multiple differential backups or incremental backups) before mistaken, the first thing to do is to enter a log backup (if you don't let the log file Grab Trunc. Log on chkpt. Option 1 Then you will die) Backup log dbname to disk = 'filename'2, restore a full storage backup, pay attention to use with Norecovery, if there are other differences or increase After backup, restore the restore database dbname from disk = 'filename' with Norecovery3, restore the last log backup, just do the log backup, specify the restore time to the time to go to the time RESTORE log dbname from disk = 'filename' with Stopat = 'DATE_TIME'
These operations can be done in the SQL Server Enterprise Manager, the difficulty is not difficult. . .
Of course, if the misoperation is some operations that do not remember the log, such as Truncate Table, SELECT INTO, etc., then the above method is not available to restore data ... f. Use the Stopat syntax to restore to instant points and use multiple devices to restore The following example restores the status of its status at 12:00 on April 15, 1998, and displays a restore operation involving multiple logs and multiple backup devices. RESTORE DATABASE MyNwindFROM MyNwind_1, MyNwind_2WITH NORECOVERYRESTORE LOG MyNwindFROM MyNwindLog1WITH NORECOVERYRESTORE LOG MyNwindFROM MyNwindLog2WITH RECOVERY, STOPAT = 'Apr 15, 1998 12:00 AM' Note date format