This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 236633 (SHILOH_bugs)
When you use SQL Server Enterprise Manager to attach multiple database files, which are saved on different hard disk driver folders, the following problems may occur:
If you create a database for some of the log or data files that are stored in a different directory than the primary database file, after you detach and try to reattach the database the Current File(s) Location check box is selected, which indicates there are invalid filenames that correspond to the files that are not located in the same folder as the primary database file. No ellipsis button is available to browse the file location for the secondary data file and the log file location. If the file location is manually changed to the correct location the attach process completes successfully.
While reattaching a previously detached database that has only one log file after the log file has been deleted (the engine allows the database to attach and automatically creates a new log file if you do not explicitly specify a log file), the Current File(s) Location check box under the Attach Database dialog box is selected, which indicates invalid filenames correspond to the log file that is not located in the same folder as the primary database file. After you click OK , the single file attachment completes successfully.
When you attach only a single data file without a log file, changing the database name disables the OK button and the attach process cannot complete.
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
You can run the sp_attach_db stored procedure to attach the database for which some of the log or data files were stored in a different directory than the primary database file.
You can run the sp_attach_single_file_db stored procedure to attach a single data file.
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
After You Apply SQL Server 2000 Service Pack 1
The Attach dialog box now looks for the files (secondary database files and log files) both in the path of the primary database file and in their initial path (from where the files where detached).
If the database initially had only one log file, SQL Server allows the attachment of the database if the log file is already deleted. A new message box prompts the user to check and see if they really want to attach the database without having the log file.
The algorithm for checking if the OK button should be enabled was modified and it is called now not only when an entry in the grid is edited but also after the grid is automatically filled with filenames (a new primary data file is specified).