Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thank you for all of the comments. Some of you helped to lead me to the answer. Here's what I found:</p> <p>It was an NTFS permission problem, and not a SQL problem. Further, it looks kind of bug-like (and it's repeatable).</p> <p>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)</p> <p>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.</p> <p>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.</p> <p>(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).</p> <p>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.</p> <p>That sounds weird to me, but I can reproduce it over and over again, so I have concluded that it is the answer.</p> <p><strong>Update:</strong> I reported this as a bug: <a href="https://connect.microsoft.com/SQLServer/feedback/details/539703/access-denied-attaching-a-database-when-permissions-are-inherited" rel="nofollow noreferrer">https://connect.microsoft.com/SQLServer/feedback/details/539703/access-denied-attaching-a-database-when-permissions-are-inherited</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload