FIX: Adding Database Files During Upgrade May Cause Errors

ID: Q200118


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 53486 (SQLBUG_70)

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 version 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 7.0. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: upgrade wizard fail abort errors

Keywords : kbbug7.00
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: November 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.