April 25, 2017 at 12:03 pm
Hi All
I can’t figure out why I can’t restore the differential backup. I have verified that it’s from the correct backupset but it’s still giving me an error that . I’m posting the header info and the code I’m using to restore below:
FILEPATH FIRSTLSN LASTLSN DATABASEBACKUPLSN
FILEPATH\FULLS\db_201704232155_COMPRESSED.BAK 775961000006058400196 775962000003906000001 775959000008533600042 Full
FILEPATH \DIFFS\db_201704231901_DIFF_COMPSD.DIF 775960000020287200048 775960000020420900001 775959000008533600042 Differential
RESTORE DATABASE dbxxx
FROM DISK = 'FILEPATH\FULLS\db_201704232155_COMPRESSED.BAK'
WITH
REPLACE,
NORECOVERY,
STATS = 5
RESTORE DATABASE dbxxx
FROM DISK = 'FILEPATH \DIFFS\db_201704231901_DIFFERENTIAL_COMPRESSED.DIF'
WITH RECOVERY, STATS = 5
Processed 14654 pages for database 'dbxxx', file 'dbxxx_log' on file 1.
RESTORE DATABASE successfully processed 9627398 pages in 137.872 seconds (545.535 MB/sec).
Msg 3136, Level 16, State 3, Line 49
This differential backup cannot be restored because the database has not been restored to the correct earlier state.
Msg 3013, Level 16, State 1, Line 49
RESTORE DATABASE is terminating abnormally.
Can anyone see what I'm doing wrong?
Thanks
Cathryn
April 25, 2017 at 12:19 pm
It looks like the FULL backup is from after the DIFF was taken. You'd need to use the full from before the diff.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 25, 2017 at 12:43 pm
Yup, your diff was created prior to your full. You can't go backwards.
April 25, 2017 at 1:30 pm
Oh geez...ok. You're right. Thank you:crazy:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply