Monday, January 24, 2011

Visual Studio / SQL Server Unable to open database / Operating systerm Error 5

Operating systerm Error 5 usually means not enough permission.

Make sure account under which SQL server service is runing has modify permission on the folder where you have kept your MDF File.

Not account under you are logged in Windows (does not matter you have permission; it is the SQL server service account that needs permission)

•Right click on the folder D:\Development Workx\Hamza Workingx\hamriqueweb_1_Edited_ALi2\App_Data and click on properties
•Click on security tab
•Click on Add button and add sql service account
•Provide modify privilege and click ok
•Verify both mdf and ldf have modify privilege
•Attach the db

No comments:

Post a Comment