December 8, 2015 at 12:45 pm
I have 1 user whom I granted with dbreader and dbwriter permission. Now he is trying to run the select statement and getting an error "The server prinicipal is not able to access the database under the current security context". Can I please get some help?
December 8, 2015 at 5:23 pm
Two quick checks. First, is the query actually against the databsae to which the user has been granted permission? Second, does the select involve a cross database query? For example, the user might be selecting from a view in database A which in turn selects from tables in database B.
December 8, 2015 at 9:38 pm
Check to see if your user is mapped to the DB you are trying to log into.
December 9, 2015 at 3:03 am
Just because you have created a login this doesn't mean the login has any access to databases, you need to give those permissions via "user mappings" in the properties of the user
_________________________________________________________________
"The problem with internet quotes is that you cant always depend on their accuracy" -Abraham Lincoln, 1864
December 9, 2015 at 8:22 am
Thanks for the reply all but the problem has been solved.
The only thing that I couldn't understand was that the user I had created was not able to access the database even though that user had sysadmin privilege, read/write access was assigned to him for that particular DB, I also added him into DB Owner role but he just couldn't run the query against the DB. So, I ended up dropping the user, recreated the user and Viola. I am still not sure why SQL Server was acting funky. Now the user has only read/write access to the DB and he is able to login.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply