BUG: An 8144 error occurs when you try to attach a database to an instance of SQL Server by using SQL Server Enterprise Manager (885712)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
Bug #: 472560 (SQL Server 8.0) Bug #: 471566 (SQL Server 8.0) Bug #: 26988 (Content Maintenance)
SYMPTOMSWhen you try to attach a database to an instance of Microsoft SQL Server 2000 by using SQL Server Enterprise Manager, you receive the following error message: Error 8144: Procedure or function sp_attach_db has too many arguments specified. You receive this error message in the Microsoft SQL-DMO (ODBC SQLState: 42000) dialog box. This problem occurs if there are more than 16 files in the database that you try to attach, including the data files and the log files in the database. CAUSEWhen you try to attach a database to an instance of SQL Server 2000 by using SQL Server Enterprise Manager, the SQL Server internally runs the sp_attach_db system stored procedure. The data files and the log files in the database are passed as the file name arguments for the sp_attach_db system stored procedure. However, for the sp_attach_db system stored procedure, the maximum number of file name arguments that can be specified is 16. Therefore, when you try to attach a database that has more than 16 files, the number of arguments for the sp_attach_db system stored procedure is greater than this limit.WORKAROUNDTo work around this problem, use the CREATE DATABASE FOR ATTACH Transact-SQL statement to attach a database that has more than 16 files. For example, you can use the following Transact-SQL statement to attach the database. CREATE DATABASE Database name
ON PRIMARY (FILENAME = 'Installation Drive:\Program Files\Microsoft SQL Server\Your Instance of SQL Server\Data\Primary file name.mdf')
FOR ATTACH
For more information about the CREATE DATABASE Transact-SQL statement, visit the following MSDN Web site: STATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.REFERENCESFor more information about the sp_attach_db system stored procedure, visit the following MSDN Web site:
Modification Type: | Major | Last Reviewed: | 9/30/2004 |
---|
Keywords: | kberrmsg kbStoredProc kbDatabase kbtshoot kbbug KB885712 kbAudDeveloper |
---|
|