How to Delete an Sql Server 2005 login?

Discussion in 'Databases' started by troubleshooter, Jan 4, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I created an additional Sql Server login, 1 of 3 I am allowed. I want to change the name of this login but i cant so the only option is to delete it.

    When i try to delete it using the Control Panel login manager I get an error message saying

    "Drop user failed! The user has been granted one or more permission(s). Revoke the permission(s) before dropping"

    But there is no user associated with this login. So how do i revoke the permissions? I dont get a logins option under security in Sql Server Management Studio > Object Explorer either.

    So how do i delete an Sql Server "Additional" login?


    Ive also used a variation on this query :

    Select *
    From sys.server_permissions
    Where grantee_principal_id = (Select principal_id From sys.server_principals Where Name = N'HERMES\bennetp')

    to obtain a grantee_principal_id. I get a single record. But if i try to delete it using:


    DELETE From sys.server_permissions Where grantee_principal_id = 2001

    I get the error message:

    Msg 259, Level 16, State 1, Line 1
    Ad hoc updates to system catalogs are not allowed.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. JorgeR

    JorgeR DiscountASP.NET Staff

    The deletion is now fixed... we updated the code
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page