Question: I’ve been trying to RESTORE a SQL Server database and getting an Error 3266. The detailed message is
The backup data in ‘%ls’ is incorrectly formatted. Backups cannot be appended, but existing backup sets may still be usable
How can I fix?
Answer: According to SQL Server BOL “The backup data at the end of "N:\myserver\mydb.bak" is incorrectly formatted. Backup sets on the media might be damaged and unusable.”
Symbols indicating the end of a file – i.e filemark in the backup device could not be read. A filemark error occurs for different reasons. Some examples:
A write failure may occur during the creation of the backup. Common reasons include, a loss of connectivity during a network backup. Or, a failure of the IO path to flush the write to disk may occur after the write to disk was reported to SQL server as successful. Troubleshooting an IO path to flush write failure can be tricky on a SAN environment
A media failure may occur on the device where the backup is located.
1) To determine the backup sets on the media, use RESTORE HEADERONLY.
2) To determine the usability of the backup sets, run RESTORE VERIFYONLY.
3) If all of the backup sets are incomplete, reformat the media using BACKUP WITH FORMAT, which destroys all the backup sets.