FIX: Restore of a Database Gives Error 4038 Due to Malformed Media Set

Article translations Article translations
Article ID: 279823 - View products that this article applies to.
This article was previously published under Q279823
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57987 (SQLBUG_70)
Expand all | Collapse all

On This Page

Symptoms

When a database is backed up to multiple disk files, and one of the files in the backup set is deleted and then used again in the same backup set to back up a database, a restore of the database using this backup set may fail with the following message:
Server: Msg 4038, Level 16, State 1, Line 1
Cannot find file ID 1 on device 'd:\north2.bak'.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.

Status

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

More information

Steps to Reproduce Behavior

To reproduce this problem, follow these steps:
  1. Execute the following command from Query Analyser:
    BACKUP DATABASE northwind to DISK = 'd:\north1.bak', DISK =    'd:\north2.bak' WITH FORMAT
  2. Delete north2.bak.
  3. Execute the following command:
    BACKUP DATABASE northwind to DISK = 'd:\north1.bak', DISK = 'd:\north2.bak' WITH NOINIT
  4. Attempt to restore the database:
    RESTORE DATABASE northwind FROM DISK = 'd:\north1.bak', DISK = 'd:\north2.bak'WITH REPLACE
    					
    You should see the error listed in the "Symptoms" section.

Properties

Article ID: 279823 - Last Review: November 2, 2013 - Revision: 3.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB279823

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