Why isn't SSMS honoring my default database settings?

我与影子孤独终老i 提交于 2019-12-11 04:39:17

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!