The following error occurs when you attach an SQL Server 2000 database to SQL Server 2005 today: An error occurred while appending the database to the server (Microsoft. sqlserver. SMO), the database test cannot be upgraded because it is read-only or has read-only files. Set the database or file to writable, and then run the recovery operation again. (Microsoft SQL Server, error: 3415)
After checking the database files, they do not have the read-only attribute. Attaching the database files to SQL Server 2000 is normal.
After checking the information, it is found that the file is not read-only. Strictly speaking, it should be a "permission" problem. The current SQL Server Logon account does not have the write permission for the file to be attached, the above "read-only" prompt appears. The solutions are as follows:
1.Copy the file to be attached to the default data directory of SQL Server;
2.During login verification, select "Windows Authentication" instead of "SQL Server Authentication", even if your login account is Sa;
3.If you must use "SQL Server Authentication", change the permissions of the Logon account so that it has full operation permissions on the files to be attached;
4.Change the Account Logon identity of SQL Server from network service to local service;
(From http://www.cnblogs.com/huangliangcoco/archive/2009/05/09/1453122.html)