FIX: Script Generation Using SQL-DMO Results in Database Name That Is Too Long (281137)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q281137
BUG #: 58164 (SQLBUG_70)

SYMPTOMS

When a database creation script is generated using SQL Server Distributed Management Objects (SQL-DMO) and the created script executes in Query Analyzer, an error that resembles the following may occur:
The identifier that starts with 'Northwind               
                                              
                                                          ' is too long. Maximum length is 128.
					

CAUSE

SQL-DMO does not trim the trailing spaces after the object name when scripting against SQL Server 7.0 servers.

WORKAROUND

Modify the generated script and remove the trailing spaces manually.

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

Enterprise Manager is an example of an application that uses SQL-DMO; therefore, a database script generated from Enterprise Manager will experience this problem.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbbug kbpending KB281137