new login unable to sign-on to SSMS

  • 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)

    2022-09-13_5-45-26

     

    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

     

  • 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

  • @grant - yes, member of public role.

  • 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

  • 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