Microsoft KB Archive/279823

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

Article ID: 279823

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q279823



BUG #: 57987 (SQLBUG_70)



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.



Steps to Reproduce Behavior
To reproduce this problem, follow these steps:   Execute the following command from Query Analyser: BACKUP DATABASE northwind to DISK = 'd:\north1.bak', DISK =   'd:\north2.bak' WITH FORMAT  Delete north2.bak.  Execute the following command: BACKUP DATABASE northwind to DISK = 'd:\north1.bak', DISK = 'd:\north2.bak' WITH NOINIT   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 &quot;Symptoms&quot; section. 

Additional query words: 4038 media set restore

Keywords: kbbug kbfix KB279823

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.