HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Restore failed for server (Microsoft.SqlServer.SmoExtended)

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sqlserversmoextendedmicrosoftforfailedserverrestore

Problem

I am using SQL Server 2008. While I am restoring database from backup file I got the error.


Restore failed for Server 'WIN-TUT3YRM1MMN\SQLEXPRESS'. (Microsoft.SqlServer.SmoExtended)

System.Data.SqlClient.SqlError: RESTORE detected an error on page (44262:41495) in database "KBCLDBNEW" as read from the backup set. (Microsoft.SqlServer.Smo)

I have tried restoring in new database but still gives the error. I am cannot find the what is the problem. Thanks for helping me.

Solution

Try running RESTORE VERIFYONLY and see if you get more information about the failure.

You could also try running RESTORE with CONTINUE_AFTER_ERROR and then run DBCC CHECKDB:

RESTORE DATABASE database_name 
FROM backup_device WITH CONTINUE_AFTER_ERROR


(i.e. running as TSQL rather than through SMO)

DBCC CHECKDB(N'databasename') WITH EXTENDED_LOGICAL_CHECKS;



Specifying WITH CONTINUE_AFTER_ERROR in a RESTORE statement attempts
to restore the database. However, there are many kinds of corruption
that prevent recovering a database. We strongly recommend that you
reserve using the CONTINUE_AFTER_ERROR option until you have exhausted
all alternatives.

All backup strategies should include regular DBCC CHECKDB runs.

Also NOTE: You do not have a backup unless you periodically successfully test restores.

Responding to SQL Server Restore Errors Caused by Damaged Backups

Code Snippets

RESTORE DATABASE database_name 
FROM backup_device WITH CONTINUE_AFTER_ERROR
DBCC CHECKDB(N'databasename') WITH EXTENDED_LOGICAL_CHECKS;

Context

StackExchange Database Administrators Q#49867, answer score: 7

Revisions (0)

No revisions yet.