PRB: Scheduled Tape Backup Waits Indefinitely if No Tape is in Drive (281665)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q281665

SYMPTOMS

If you use a tape drive to perform a BACKUP or a RESTORE operation as a scheduled job, and the tape drive does not have a tape inserted, the connection waits indefinitely for the tape to be loaded.

When you run a Backup or Restore command from the SQL Server Query Analyzer, the following error message occurs:
Server: Msg 4027, Level 16, State 1, Line 1
Mount tape for RESTORE HEADERONLY of database ''.
However, the error message is not logged to the Microsoft Windows NT Event Log nor to the SQL Server Error log when you execute the command as a job.

This behavior prevents regularly scheduled transaction backups from taking place and may cause the transaction log to fill up.

This behavior is true for the following types of statements:
  • RESTORE HEADERONLY
  • RESTORE FILELISTONLY
  • BACKUP DATABASE
If you do not add a tape to the drive, the only way to stop the tasks are to kill the tasks in Task Manager.

CAUSE

By default, the SQL Server tape option to read from tape is set to Wait Indefinitely on the tape device.

WORKAROUND

To work around this problem, in the SQL Enterprise Manager:
  1. Right-click the SQL Server name, and then click Properties.
  2. In the Properties dialog box, click Database Settings.
  3. In the Backup/Restore section, click the appropriate Time-Out Period option button.

Modification Type:MajorLast Reviewed:9/13/2001
Keywords:kbprb KB281665