delete login and get error

  • I have a login that I am trying to delete. It does not belong to any databases, yet I get a 21773 error. Something about login not found user system tables.

    Any ideas?

    Thanks,

    Joseph

  • If the login is appearing it has to be somewhere. You can try looking in sysxlogins in the master database. If you don't find it there then you may want to look in sysusers in each database.

    Robert W. Marda

    SQL Programmer

    bigdough.com

    The world’s leading capital markets contact database and software platform.

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems

  • Where do you see the login? How are you trying to drop it? And are you sure you are dropping it from the right database when you do so?

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I found the login in the sysxusers table. Thanks.

    Now when I try to delete it I get the message "can't directly modify system tables". I looked in the properties of the database and tried to change "Server Settings"--> "allow modifications to be made directly to the system catalogs". But when I set it, press OK and go and check it again it is not checked.

    How do I delete the sysxlogins records?

    Joseph

  • That is the setting that must be changed in order to delete the login from sysxlogins.

    Here is the T-SQL command that will set that setting to allow you to delete a login from sysxlogins:

    exec sp_configure N'allow updates', 1

    reconfigure with override

    Once through run this to put it back to not allow updates to the system tables:

    exec sp_configure N'allow updates', 0

    reconfigure with override

    Robert W. Marda

    SQL Programmer

    bigdough.com

    The world’s leading capital markets contact database and software platform.

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems

  • THANKS!

    My sysxlogins table is now fixed.

    Joseph

Viewing 6 posts - 1 through 5 (of 5 total)

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