I had a database which i dropped using the below command.
USE master; GO ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO DROP DATABASE dbname;
Now when i refresh the connection in SSMS i get the error message
Cannot open database "dbname" requested by login.The login failed.Login failed for user 'DOMAIN\Windowsusername'.Microsoft SQL Server,Error 4060
I remember that the owner for that database was the same login "DOMAIN\Windowsusername" . So i think now when i connect using the same user login ,it is trying to connect to the dropped database. Since the database is dropped i cannot change the owner of the db. How can i get rid of this error.