Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 667285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:54:41+00:00 2026-05-13T23:54:41+00:00

I am using SQL Server 2008 developer edition. I was trying to attach the

  • 0

I am using SQL Server 2008 developer edition. I was trying to attach the AdventureWorks2008 database.

When I tried to attach, I received an “access is denied” error. According to the event log, it came from the O/S:

Open failed: Could not open file D:\ProjectData\AdventureWorks\AdventureWorksLT2008_Data.mdf for file number 0. OS error: 5(Access is denied.).

I thought “NTFS problem”, but System (and I) have modify access to both files.

I found that I can successfully attach the database if I log in as sa, but my user account won’t work.

I am a member of the local administrators group on my machine, and I am in the sysadmins role in SQL Server instance.

Any idea why I had to be logged in as sa?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:54:41+00:00Added an answer on May 13, 2026 at 11:54 pm

    Thank you for all of the comments. Some of you helped to lead me to the answer. Here’s what I found:

    It was an NTFS permission problem, and not a SQL problem. Further, it looks kind of bug-like (and it’s repeatable).

    The problem:
    The account that I was using had full control NTFS permissions to the mdf and ldf files. However, it had those permissions through group membership (the Local Administrators group had permissions, and my account is a member of local admins). (I verified the permissions)

    If I try to do the attach, connect to SQL Server as me (where I am in the admins group), it fails with the NTFS problem.

    However, if I grant the same file permissions that the local admin group has directly to my Domain Account, then I can attach with no problems.

    (oh, and yes, I checked the local groups on this machine, and I verified that my domain account is indeed a member of the local admins group).

    So, it looks as though the error occurs because some code (either in SQL Server or Management Studio) checks for the permissions that the user account holds, but it doesn’t go so far as to check group permissions that the user account inherits.

    That sounds weird to me, but I can reproduce it over and over again, so I have concluded that it is the answer.

    Update: I reported this as a bug: https://connect.microsoft.com/SQLServer/feedback/details/539703/access-denied-attaching-a-database-when-permissions-are-inherited

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just installed SQL Server 2008 Developer edition and I'm trying to connect using
I am using SQL Server 2008, developer edition. I connect to my database from
I have a database that I have created using SQL Server Developer 2008. I
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; What I'm ultimately trying to do is update a sql
I install SQL server 2008 developer edition and I connect to it using Windows
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; using Northwind; N00b here, Trying to customize a asp.net gridview
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; Kinda new at C# here.. I got the first row
My development machine has SQL Server 2008 Developer edition on it. A production server
I have got hold of a sql server 2008 developer edition and this is
I can connect to my sql server 2008 developer server using this in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.