SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On



Server unable to access database under current context Expand / Collapse
Author
Message
Posted Monday, April 30, 2007 9:49 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 21, 2009 2:46 PM
Points: 41, Visits: 23
 Hi guys. I created a database "MyDatabase" using an AD Account "user01" which is a member of a domain group "GroupA". I have created a login in my SQL Server 2005 for this AD group. I have also added the said login as a user of my database. I created other AD users and put them in the same group. When I try to access the database using the other users, I get this message

The server principal "MyDomain\user02" is not able to access the database "MyDatabase" under the current security context.

This KB tells me that my situation is triggered by the first case in which the owner of the database is windows authenticated. I have already set the database to be TRUSTWORTHY. I haven't tried CERTIFICATES though. I believe I haven't done anything complex to warrant this solution.

I'm really lost with the myriads of principals and securables that SQL2005 has. All I want is just to execute a certain set of stored procedures. I can't do this because I can't even execute "USE MyDatabase". What are the permissions I need to give to "GroupA" ?




"The way to get things done is not to mind who gets the credit for doing them." - Benjamin Howett
Post #362018
Posted Wednesday, May 02, 2007 2:07 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 21, 2009 2:46 PM
Points: 41, Visits: 23
Made this work per suggestion of an MS guy. The behavior is due to the fact that the owner of the database is not a local account that belongs to the sysadmin account. I recreated the db using the local administrator and the problem is gone.


"The way to get things done is not to mind who gets the credit for doing them." - Benjamin Howett
Post #362537
Posted Wednesday, January 23, 2008 2:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 03, 2010 6:39 AM
Points: 12, Visits: 77
it work for me
Post #446315
Posted Monday, April 28, 2008 8:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 24, 2009 11:53 AM
Points: 3, Visits: 39
instead of recreating the database you may also change the db owner in of the database to the username you are using.
Post #491444
« Prev Topic | Next Topic »


Permissions Expand / Collapse