-> I was restoring a database backup using SSMS.
-> I got below error,
TITLE: Microsoft SQL Server Management Studio
Restore of database ‘JBS_DB’ failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
System.Data.SqlClient.SqlError: RESTORE detected an error on page (0:0) in database “JBS_DB” as read from the backup set. (Microsoft.SqlServer.SmoExtended)
For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=15.0.18131.0+((SSMS_Rel).190606-1032)&LinkId=20476
-> Executing a restore verify only command as below,
restore verifyonly from disk ='C:\Temp\JBS_DB_10July2019.bak'
-> Received below message,
Msg 3203, Level 16, State 1, Line 1
Read on “C:\Temp\JBS_DB_10July2019.bak” failed: 13(The data is invalid.)
Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.
-> It seems like the backup file is corrupted. Performed another backup on the database and tried a restore again and it failed with same error.
-> May be the database itself is corrupted. Executed a DBCC Checkdb on the database where backup was performed. It came out clean. So this is not a corruption issue.
-> Looking closely at the error message. The error is on page 0:0. In reality, there is no page 0:0 in a database.
-> Spoke to the application team handling the database and understood that they are using a Third party tool to encrypt the database. After discussion, I advised them to decrypt the database using the tool.
-> I performed a backup and performed a restore. This time restore worked fine.
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.