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