Login and user SID dont match, but login still works.

  • I have a scenario I thought was impossible.  The login below has an sid that doesnt match the DB user, but is still able to login, access the db and query as normal.

    select sid as [sessionID],* from myDatabase.sys.sysusers where name = 'hsi'
    select sid as [sessionID],* from sys.sql_logins where name = 'hsi'

    In User Mapping, the login is unchecked for myDatabase.
    How does that login still have access?

  • askcoffman - Friday, August 3, 2018 8:31 AM

    I have a scenario I thought was impossible.  The login below has an sid that doesnt match the DB user, but is still able to login, access the db and query as normal.

    select sid as [sessionID],* from myDatabase.sys.sysusers where name = 'hsi'
    select sid as [sessionID],* from sys.sql_logins where name = 'hsi'

    In User Mapping, the login is unchecked for myDatabase.
    How does that login still have access?

    Check the server permissions of the login.

  • Lynn Pettis - Friday, August 3, 2018 9:36 AM

    askcoffman - Friday, August 3, 2018 8:31 AM

    I have a scenario I thought was impossible.  The login below has an sid that doesnt match the DB user, but is still able to login, access the db and query as normal.

    select sid as [sessionID],* from myDatabase.sys.sysusers where name = 'hsi'
    select sid as [sessionID],* from sys.sql_logins where name = 'hsi'

    In User Mapping, the login is unchecked for myDatabase.
    How does that login still have access?

    Check the server permissions of the login.

    That was it, the account is an SA.  Thanks for pointing that out.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply