I cannot connect to the database anymore, I'm getting:
Cannot open user default database. Login failed.
I have deleted the database during a previous session and then tried to recreate it. But the recreate failed.
Now I am stuck with this error, what can I do?
Edit: I'm using Windows Authentication
use the command:
sqlcmd -E -d master
ALTER LOGIN [Your Windows Login] WITH DEFAULT_DATABASE=master