Error message when you perform a database backup to disk or tape or a database restore from disk or tape: "3266," "3013"

Article translations Article translations
Article ID: 290787 - View products that this article applies to.
This article was previously published under Q290787
Expand all | Collapse all

SYMPTOMS

When you perform a database backup to disk or tape, or a restore from disk or tape, the following error message may occur:

SQL Server 7.0
Server: Msg 3266, Level 16, State 1, Line 1
The Microsoft Tape Format (MTF) soft filemark database on backup device 'devicename' cannot be read, inhibiting random access.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.
SQL Server 2000
Server: Msg 3266, Level 16, State 1, Line 1
The backup data in 'devicename' is incorrectly formatted. Backups cannot be appended, but existing backup sets may still be usable.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
SQL Server 2005
Server: Msg 3013, Level 16, State 1, Line 1
The backup data at the end of 'devicename' is incorrectly formatted. Backup sets on the media might be damaged and unusable. To determine the backup sets on the media, use RESTORE HEADERONLY. To determine the usability of the backup sets, run RESTORE VERIFYONLY. If all of the backup sets are incomplete, reformat the media using BACKUP WITH FORMAT, which destroys all the backup sets.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

CAUSE

A filemark in the backup device could not be read. There are many reasons why you may encounter a filemark error. Some of the reasons include the following :
  • A media failure may occur on the device where the backup is located.
  • A write failure may occur during the creation of the backup.

    For example, a loss of connectivity may occur 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.

WORKAROUND

To allow SQL Server to perform new backups to the backup device, you must manually delete or erase the device by using the following command:
BACKUP DATABASE mydatabase TO DISK='C:\MyDatabase.bak' with FORMAT
				
If the error message occurs during a restore operation, it may be possible to retrieve other backup sets from the device by specifying the file number. For example, if three (3) backups were on one (1) backup device, backup sets 1 and 2 may be usable. To determine if multiple backup sets are on a device, run the following code from Query Analyzer:
RESTORE HEADERONLY FROM DISK='C:\MyDatabase.bak'
				
Each backup set has 1 entry in the output. To indicate a specific backup set, use this code:
RESTORE DATABASE mydatabase FROM DISK='C:\MyDatabase.bak WITH FILE = FileNumber
				
Note FileNumber is the backup set number you want to restore.

MORE INFORMATION

The following list contains important notes regarding backups and SQL Server.
  • After SQL Server detects a filemark error on a device, SQL Server does not write additional information to the device.
  • SQL Server stores all backups in the Microsoft Tape Format, whether the backup is made to disk or to tape. The Microsoft Tape Format uses filemarks to hold information such as the block size and the number of blocks in a backup, in addition to other information about the backup. The Microsoft Tape Format also uses filemarks to delimit backups in a backup device. The fact that a filemark is missing or is damaged, suggests that at least one backup on the device is not valid.
  • Although you may be able to restore some backup sets from the damaged device, you must verify the integrity of the restored database.
  • SQL Server logs details of success or of failure during a backup operation or a restore operation in the SQL Server error log and in the backup history tables in the msdb system database.
  • If you experience an error 3266 when you restore a transaction log or a database backup, investigate the following logs for more information:
    • SQL Server error log
    • Backup and restore history tables
    • Application event log
    • System event log
    If there are no details of the failure in these logs, you may have experienced an unreported failure. You should contact Microsoft Product Support Services if you need help.

    For more information about Microsoft Product Support Services telephone numbers and for more information about support costs, visit the following Microsoft Web site:
    http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Properties

Article ID: 290787 - Last Review: February 22, 2007 - Revision: 5.3
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbbug kbpending kbprb KB290787

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com