February 26, 2010 at 10:02 am
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
February 26, 2010 at 11:16 am
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.
February 26, 2010 at 11:18 am
Either those whose password are stored or all of them it doesn't matter although I prefer all of them if possible.
February 26, 2010 at 11:46 am
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
February 26, 2010 at 11:50 am
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.
February 26, 2010 at 11:51 am
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:
February 26, 2010 at 11:53 am
Thank you Nicholas, I'll try with cautious.
February 26, 2010 at 12:01 pm
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