问题
I'm attempting to restore a SQL Server 2012 .BAK file to my local server. I've successfully restored this .BAK file before. However now, when I try, I get the following error:
RESTORE detected an error on page (0:0) in database 'databasename' as read from the backup set.
Running the following command works:
RESTORE HEADERONLY FROM DISK = 'D:\database.bak'
However, running the following:
RESTORE VERIFYONLY FROM DISK = 'D:\database.bak'
Returns the following error:
Msg 3203, Level 16, State 1, Line 1
Read on "D:\database.bak" failed: 13(The data is invalid.)
Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.
I downloaded the .BAK file from an FTP server again this morning and got the same error. I asked someone else with access to the same backup file and they can restore it with no issues at all. Any ideas?
回答1:
It is possible that you have a bad bak file or the source database is corrupted.
Verifiy the source database:
DBCC CHECKDB('DatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS
on the server the backup was taken on.
Then try to backup it again and when copying the resulting bak, try to binary copy your file with other alternatives such as Robocopy, Copyfile, etc.
回答2:
All the solutions point out to a corrupt backup file that can NOT restore. What I did then was to go to the source SQL Database and run DBCC CHECKDB
. Also it is good practice to check on "Verify Backup" when executing the backup.
回答3:
In SQL Server Restore Database, select backup file and click on Verify Backup Media
.
If the backup file is corrupt, you will see error message.
回答4:
Once a while we had the same error when downloading backup with Maxthon browser, after we download it with Windows RDP all start to work.
来源:https://stackoverflow.com/questions/18966251/restore-detected-an-error-on-page-00-in-database-database-as-read-from-the