"SQL" error about unable to attach file

Source: Internet
Author: User

Set MDF and LDF files to Full Control

————————————————————————————————————————

Here are some other solutions online:

SQL Server 2005 Additional database error: Attempting to open or create a physical file

Http://blog.sina.com.cn/s/blog_610c1cad0100q4nv.html

The physical file "E:\works\database\northwnd\northwnd.mdf" could not be opened. Operating system error 5: "5 (Access denied. )"。 (Microsoft SQL Server, error: 5120)

My System (Windows Server 2003) has been re-installed, I want to attach the previous database, but can not be attached, the error is as follows: when trying to open or create a physical file ' e:\ database \db.mdf ', the creation file encountered operating system error 5 (Access denied. )

My workaround:

In all Programs-sql Server 2005-Configuration Tools-"SQL Server Configuration Manager", click on "SQL Server 2005 Services", the right side will show the user, right-click on your user (such as SA) attribute, built-in account selection " Local System ", click on restart to OK

————————————————————————————————————————————

About SQL Server cannot open physical file operation Error 5: "5 (Access denied. ) "Solutions

Http://blog.sina.com.cn/s/blog_a604dec601011we1.html

I created the database times today. Unable to open the physical file operating system error 5: "5 (Access Denied)", waste a half-day effort to solve, the following is the way I solve:

1. Check Windows Integrated authentication mode. Ok

2. Assigning permissions to a folder, specifying Erverone to all permissions

3. Open SQL Server Configuration Manager, locate the SQL Server service, stop the service, click Properties, change the login status to the built-in account local system, and restart the service.

4. Open the system service, locate the SQL Server service, stop the service, click Properties, and change the login status to the SYSTEM account.

The above methods can solve the above errors, there is always one to solve. It can also be resolved if the attached database reports a similar error.

"SQL" error about unable to attach file

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.