Reputation: 13068
SQL Server 2008 doesn't remember password inspite of checking the "Remember Password" checkbox.
I was suspecting a reboot would solve the problem. But, the issue persists.
Environment: Windows Vista Ultimate, SQL Server 2008
I have been hesitant to post this, as it seems so trivial and weird.
Upvotes: 38
Views: 22146
Reputation: 91
This worked for me: I went to Control Panel -> Credential Manager, in the "Windows credentials" category then "add a Windows credential" and manually created a record with: IP User Password
and then SSMS started to remember the password
Upvotes: 1
Reputation: 5442
For me, I solve my problem by running "SQL Server Manage Studio" (SSMS) by Admin right (right click, Run as Administrator) and tick check box "Remember password", type password and connect.
Then the next time I run SSMS normally and boom, no need to type password again.
It seems that SSMS have problem writing credential and run as Administrator do solve it.
Upvotes: 0
Reputation: 3047
You can remove user setting completely and SSMS will be able to remember new logins. Be aware this way you'll lose all the saved ssms logins.
User settings location is
%APPDATA%\Microsoft\SQL Server Management Studio\[you ssms version here]\UserSettings.xml
Upvotes: 0
Reputation: 894
There is a solution for this in SSMS 2012 that worked for me. Microsoft now provides a mechanism for removing a server from the list of remembered servers, and removing the offending server from the list will allow you to save the password the next time you connect to it:
Upvotes: 67
Reputation: 293
If you register the server, and connect to it that way (just a quick double click), it works great!
I got this from serverfault.com and it worked great!
Upvotes: 26
Reputation: 7184
Does this bug report match what you're seeing?
EDIT (January 10, 2015): Ganesh points out in a comment that this link is now dead. This decade-old bug was closed as “Won’t Fix,” but it has been reposted/reopened here. (I put a screenshot of the cached page here, for anyone who’s interested.)
Upvotes: 11
Reputation: 111
I believe I found the solution to this problem.
If your SQL Server seems to have forgotten your passwords, try this:
At the log on screen, click on the down arrow of the Logon selection box.
Do not select a logon name right away.
Wait a few seconds.
Then select the logon name from the list.
Your password will appear in the password box.
Why does this strange behavior occur? I believe SQL Server may have to poll accounts and does not do it in time when you click immediately on the log on name.
Upvotes: 10
Reputation: 716
The SSMS 2012 answer didn't work for me since I'm on 2008 R2. However, I did find a way to "fix" it. It's not a true fix, but if you keep a backup of the file, you can always restore it very easily if one of the servers loses your credentials.
Important Note:
While playing around trying to find out WHY/WHEN it actually does lose credentials, I found that it seems to always remember the last used username that has never been used for that specific server using your profile. For example, if you start with a fresh profile, and you connect to a server called MyServer, and you begin by using sa for the username, regardless of if you check "remember password" or not, if you log in successfully with sa, it seems that SSMS now stores that in memory. Now if you use the username Tester and log in successfully, it will always open by default with Tester as the user.
Now for the fix/workaround:
First, check out this article, but I recommend that you DON'T DELETE the file, just rename it to SqlStudio.bin.OLD or something, so you can always restore it to check any settings that would have been reset using this method.
MY Approach:
I first renamed my bin file like I recommended. Then, I opened SSMS and logged in to every server that I use most often, using the credentials I always want to use for those servers, and selected "Remember password" for each one. I then made a BACKUP of the bin file, and store it in a secure place on my network. This way, if I ever need to log in to a server with another username for testing or whatever, I can easily restore my original bin file afterward. Or, if you want, before you use the new username, you could just rename the bin file and do your work as the new user. Once you're done, just delete the new bin file and rename your original back to .bin and you'll be good to go.
The key is to get a good version of your bin file and make a backup. If you ever add a new server, you can log in using the same approach as above, using your desired credentials and remember password, and then copy the bin file to the backup location. Hope this helps!
Upvotes: 5