Yesterday when you attached a SQL Server 2000 database to SQL Server 2008, the following error occurred:
The attach database failed for server "servername". (MICROSOFT.SQLSERVER.SMO)
The database ' dbname ' could not be upgraded because it is read-only or has a read-only file. Make the database or file writable, and then rerun the restore operation. (Microsoft SQL Server, error: 3415)
Viewing the database files, they do not have read-only properties, and attaching in SQL Server 2000 is all normal. Click the Help link in the error message dialog to open an invalid link for the I ' m Sorry, BS Microsoft.
Multi-party research, the discovery is not a file read-only problem, strictly speaking should be a "permissions" problem, the current SQL Server login account does not have the writable permission to attach the file, there will be the above "read-only" prompt,
There are several ways to solve this problem:
Method 1: Copy the attached file to the SQL Server default Data directory, at which point the attach succeeds;
Method 2: When signing in for authentication, select Windows authentication instead of SQL Server authentication, even if your login account is sa;
Method 3: If you must use SQL Server authentication, change the permissions on the login account so that it has full operation permissions on the file you want to attach;
Change the account login identity of the SQL Server service from the Network service to the Local service;
This issue occurs under Windows XP, incidentally, now the SQL Server 2008 Enterprise Edition can be installed under XP.
Workarounds for SQL Server 2008 Attach database failure