Workarounds for SQL Server 2008 Attach database failure

Source: Internet
Author: User

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

Related Article

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.