|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, December 21, 2012 1:03 PM
Points: 3,
Visits: 15
|
|
I recently backed up a database and when trying to restore it to my local machine I got this error:
Msg 3182, Level 16, State 2, Line 1 The backup set cannot be restored because the database was damaged when the backup occurred. Salvage attempts may exploit WITH CONTINUE_AFTER_ERROR
I tried several different backups (e.g., with the crc check/verifying the backup options checked/unchecked). I tried restoring within the management studio gui and via T-SQL script. Each time the same error.
I can successfully restore if I include the 'continue_after_error' but I'm unaware of what the error was and it leaving it this way will give me a nagging feeling of doom to come.
What should I be doing to troubleshoot this? I'm a relative beginner with respect to database administration and until now, things have gone smoothly in all my backups/restores.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 6:43 AM
Points: 1,785,
Visits: 1,008
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:49 PM
Points: 38,095,
Visits: 30,389
|
|
The source database is probably damaged. Discard that backup, it's likely to be fairly useless. You shouldn't be worrying about the backup at this point, worry about the DB that the backup was taken of.
How often do you run CheckDB on the source database and when did it last run without errors?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 2:47 AM
Points: 5,
Visits: 9
|
|
Checkout these below mansion references would be help you.
http://msdn.microsoft.com/en-us/library/ms177429.aspx http://msdn.microsoft.com/en-us/library/ms175510.aspx http://msdn.microsoft.com/en-us/library/ms177429%28v=sql.100%29.aspx
Thanks
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, December 21, 2012 1:03 PM
Points: 3,
Visits: 15
|
|
Thanks everyone for the responses. I'm a hobbyist programmer so my self-training has many holes. CheckDB was one of those holes. However, running it now seemed relatively positive, as much as I can make out the output. It was much like the sample output on the MSDN page. And at the end it said,
CHECKDB found 0 allocation errors and 0 consistency errors in database 'mydatabase' So that was a relief of sorts.
However, I noticed something that should have been obvious to me the first time around that is perhaps a related detail.
In the database listing in SQL Management Studio it has (Principal, Suspended) behind the database name. This is on the web host and after a quick search it seems that this is related to a database mirroring arrangement (that I didn't know about). Could this cause the backup problem?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:49 PM
Points: 38,095,
Visits: 30,389
|
|
Yes, that's database mirroring. No, it would not have caused the backup error. It's likely to cause you lots more fun unless you resume the mirroring or remove the mirroring entirely (like full transaction logs, drives out of space and such entertainment)
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, December 21, 2012 1:03 PM
Points: 3,
Visits: 15
|
|
It turned out that fixing the database mirroring made my database restoration difficulties go away.... though it took my host a fair while to get that straightened out.
And you were right about runaway log file size ... the backups shrunk _noticeably_ after the fix.
Thanks again for the help.
|
|
|
|