Cannot Drop Login

  • Hello Everyone

    I am trying to drop a Login, but I receiving this error and cannot seem to get around it.

    Login '<DOMAIN>\<Login>' has granted one or more permission(s). Revoke the permission(s) before dropping the login. (Microsoft SQL Server, Error: 15173)

    This query come up empty

    select * from sys.server_permissions

    where grantee_principal_id =

    (select principal_id from sys.server_principals where name = N'<DOMAIN>\<Login>')

    Does anyone have experience with this? Or know what I can do to be able to drop this Login?

    Thank You in advance

    Andrew SQLDBA

  • The issue is the login 'DOMAIN\Login' has granted one or more permission(s) to some other login.

    Run this query for more details:

    select * from sys.server_permissions

    where grantor_principal_id =

    (select principal_id from sys.server_principals where name = N'DOMAIN\Login')

    After that run this:

    execute as login = 'DOMAIN\Login'

    revoke ....

    ....

    revert

    Now you should be able drop the login.

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

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