Introduction
Every time we connect to SQL Server Management Studio by default it connects to "master" database. In day to day development, if you are working with one of your project database it will be difficult to switch to your database every time using the "USE [YourDBName]" statement or selecting database from dropdown list.
The following tip shows how to set default database using "Login Properties" window and T-SQL.
Set Using Login Properties:
Open SQL Server Management Studio > View > Object Explorer(F8) > Security > Logins > Right Click on Login > Properties > Under General tab you can find "Default Database" dropdown > Select your project database.
Fig: Login Properties - Set Default Database
Set using T-SQL
Exec sp_defaultdb @loginame='sa', @defdb='DotNetMirrorDB'
Hope it saves your time!