September 13, 2022 at 9:50 am
I created a new SQL login. Then i created a new user on database A and add this user to db_datareader role.
When i tried to signin via SSMS with this new login, i get the following:
Cannot connect to XXSERVERNAMEXX.
===================================
The SELECT permission was denied on the object 'dm_os_host_info', database 'mssqlsystemresource', schema 'sys'. (.Net SqlClient Data Provider)
I read on different forums saying that it could be this login is a member of some deny roles, but i double checked it's not in any of those deny roles.
What else could it be? thanks
September 13, 2022 at 12:29 pm
Is your user in the public role? If not, that could be it. That's required to access sys.dm_os_host_info per the documentation.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 13, 2022 at 1:42 pm
@grant - yes, member of public role.
September 13, 2022 at 2:35 pm
Then walk through all other roles and groups that the login is associated with. Something has gone south.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 14, 2022 at 9:38 am
no other server role beside public. mystery to me
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply