Article Link
This error bugged the crap out of me tonight and I saw all kinds of crazy answers usually involving some sort of SQLCMD -blah -blah…i think this maybe the problem with command line happy developers/dbas but to make a long story short the fix is EASY and you will kick yourself for not trying this.
1. click the options button if the options are not showing.
2. click the connection properties tab if it is not active
3. click on the Connect to database: dropdown
4. type in the name of a database that still exists (ex. ‘master’)
5. connect!
I heard all kinds of rants and raves about how atrocious it was that microsoft did this to us and I agree it does suck that SQL Server doesn’t do something about this automagically but what would you suggest it do?

