When I use SQL Server Management Studio to log in to databases, it ignores my default DB and always puts me in master. I checked that my Windows user has a login with the correct DB set, and I tried changing the default DB of groups that I'm in without any effect. At login, I tried going to Connection Properties and setting "Connect to Database" to <default>
, but it always gets reset to master. If I run Management Studio as a different Windows user, it applies default DB correctly.
Any ideas?
Best Answer
Change the default database of your database user. I suspect that group permissions are snarling you up. You can use the
sp_defaultdb
stored procedure.Or you could use this bit of SQL: