FIX: Adding Database Files During Upgrade May Cause Errors

Article translations Article translations
Article ID: 200118 - View products that this article applies to.
This article was previously published under Q200118
This article has been archived. It is offered "as is" and will no longer be updated.
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:
232570INF: 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.

Properties

Article ID: 200118 - Last Review: October 11, 2013 - Revision: 2.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB200118

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