Reseting SSMS login info

  • Hello,

    Is there a way to reset (delete) logins that shows up in the login drop down list in SSMS along the passwords associated with them? Making the login list empty the next time SSMS open? (Like a fresh install)

    Thank you

  • Do you want to drop all the SQL logins that have a certain password? Can you restate what the criteria is for dropping the logins please.

  • Either those whose password are stored or all of them it doesn't matter although I prefer all of them if possible.

  • You can use the following, let me know if you want a cursor or while statement to execute it programatically. Otherwise you can just execute the output:

    USE MASTER

    DECLARE @SQL VARCHAR(MAX)

    SELECT 'DROP LOGIN [' + Name + ']'

    FROM sys.SERVER_PRINCIPALS

    WHERE type_desc in ('WINDOWS_GROUP','WINDOWS_GROUP','SQL_LOGIN')

    AND principal_id > 257

  • Hello Toby,

    Thank you for your time but I believe it won't do what I need.

    I would like to remove the login from the SSMS dropdownlist on the connect windows (as shown in the picture attachment)

    I do not wish to drop logins from the database.

  • In XP c:\documents and settings\<username>\application data\Microsoft\Microsoft SQL Server\100\tools\shell

    look for SqlStudio.bin

    Connection information is stored in there, if you delete the file the connections go away, when you relaunch SSMS it get's created again.

    NOTE: I do not know what else might be impact by deleting this file or what other information is stored within it. Delete at your own risk!:exclamation:



    Shamless self promotion - read my blog http://sirsql.net

  • Thank you Nicholas, I'll try with cautious.

  • Thank you Nicholas!

    I've try it out and it is working as expected. I'm aware that I'm the sole responsible if something goes wrong!

Viewing 8 posts - 1 through 7 (of 7 total)

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