问题
For some reason SSMS isn't honoring my default database setting. I have set my default database using
Exec sp_defaultdb @loginame='[username]', @defdb='[database_name]'
or by using Security > Logins > [my login] > Properties > Default Database
This seemed to have started when I took my default database offline and then couldn't log in. I had to use sp_defaultdb to change to another database until I could bring it back online. Now it just goes to master, even though it's set to my default db when I open my login's properties. Any ideas?
I'm using SSMS 2008 & SQL Server 2008.
回答1:
Rookie mistake: A few weeks ago I had set the 'Connect to database:' to the master db on the Login dialog (Connection Properties tab).
来源:https://stackoverflow.com/questions/12098021/why-isnt-ssms-honoring-my-default-database-settings