Article ID: 200118 - Last Review: March 14, 2006 - Revision: 2.1

FIX: Adding Database Files During Upgrade May Cause Errors

This article was previously published under Q200118
BUG #: 53486 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

If the database file layout is customized during the upgrade of a database from SQL Server 6.5 to SQL Server 7.0, the following error message may be generated during the Database Creation step of the upgrade:
Create Database Errors Detected
Errors were reported while the databases were being created. How do you want to proceed?

CAUSE

A file named Createdb.sql is generated during the upgrade to create the databases on the import server. Because of a bug in the Upgrade Wizard, ALTER DATABASE commands may be scripted incorrectly.

WORKAROUND

When the error in the Creating Databases step occurs, click on the View Error File button to view the Createdb.sql script using Notepad. Locate the commands in the script that begin with:
ALTER DATABASE [dbname] ADD FILE
				
Remove all but the last "TO FILEGROUP [filegroupname]" in the ALTER DATABASE statement.

For example, the incorrectly generated statement will look similar to the following:
ALTER DATABASE [db1] ADD FILE
    (NAME = [dbData1], FILENAME = 'c:\mssql7\data\dbdata1.ndf', SIZE = 5120 KB) TO FILEGROUP [fg1]
  , (NAME = [dbData2], FILENAME = 'c:\mssql7\data\dbdata2.ndf', SIZE = 5120 KB) TO FILEGROUP [fg1]
				
The corrected statement should look similar to the following:
  ALTER DATABASE [db1] ADD FILE
    (NAME = [dbData1], FILENAME = 'c:\mssql7\data\dbdata1.ndf', SIZE = 5120 KB)
  , (NAME = [dbData2], FILENAME = 'c:\mssql7\data\dbdata2.ndf', SIZE = 5120 KB) TO FILEGROUP [fg1]
				
After modifying all incorrect ALTER DATABASE commands, save the file and quit Notepad. Select the Stop the Upgrade button, then retry the task with the corrected Createdb.sql file by clicking the Retry Task button. The upgrade process will continue.

STATUS

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

APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbbug kbfix KB200118
 

Article Translations

 

Related Support Centers