An error occurred while attaching the database to the server. The database cannot be upgraded because it is read-only or has a read-only file.

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.