RESTORE VERIFYONLY reports Msg 3203, “Reached the end of the file”, on a backup. Check which file SQL Server is reading, then validate an intact copy before trying the restore again.
RESTORE VERIFYONLY returned Msg 3203 on the truncated copy; RESTORE DATABASE returned Msg 3287 instead. Compare a copied file with a known-good source, and do not overwrite a good backup with the failing copy.The exact Msg 3203 from RESTORE VERIFYONLY
Why VERIFYONLY reached the end of the file
SQL Server reached the end of the backup file while reading the backup set. In this reproduction, the file had been truncated to half its original size. RESTORE FILELISTONLY still returned both logical files, but that showed only that the header was readable, not that the backup data was complete.
A fresh control backup of the same database passed RESTORE VERIFYONLY and reported that the backup set was valid.
Check the exact backup file
Start by confirming the full path in the failing command. A readable file list is not a completeness check. Run VERIFYONLY against the exact copy you intend to restore:
RESTORE VERIFYONLY
FROM DISK = N'D:\Backup\YourDatabase.bak';
If this is a copied backup, compare it with the source and obtain a fresh copy from a known-good source if it is incomplete. If you can create a new backup, verify that file before using it for the restore. Do not replace or overwrite a good backup with the failing copy.
For the command syntax and options, see Microsoft Docs: RESTORE VERIFYONLY (Transact-SQL).
RESTORE DATABASE returned a different error
In the same HPAI01 test, RESTORE DATABASE against the same truncated file returned Msg 3287, then Msg 3013. The captured Msg 3203 above came from VERIFYONLY. Keep that distinction: this test does not show that every damaged backup returns 3203 during a direct restore.
Frequently Asked Questions
Does RESTORE FILELISTONLY prove the backup is complete?
Will RESTORE DATABASE return Msg 3203 too?
Does this prove the source database is damaged?
Which message should I troubleshoot first, Msg 3203 or Msg 3013?
Follow the message from the operation that failed, not only the final 3013 line.
- RESTORE Is Terminating Abnormally (Errors 3013 and 3241), when 3013 is the last message and another error appeared first.
- SQL Server Backup Failed or the Restore Is Stuck, for the wider backup and restore checks.
Leave a Reply