February 1, 2017 by Kenneth Fisher
When you open SSMS a connection window automatically comes up. Then once you pick your server, connection type, username and password (if needed) you get an object explorer connection.
But what if that isn’t what you want?
In my second ever post (way back in August of 2012) I talked about the at startup setting in SSMS. That’s over 4 years ago, so what’s changed in the mean time?
Well, the setting has moved to the Startup tab.
The options haven’t changed as far as I can tell. (I’m hoping it is fairly obvious what each does so I’m not going into any details.)
Back then I used Open Object Explorer and query window but these days I use the Open empty environment option since I’m never sure if I’ll want a query window or object explorer open when I open SSMS.
Using this setting you can easily change the initial connections made by SSMS. Once you have selected what, if any, connections you want to start with, what do you do if you want to automatically log into a specific instance? Or open one or more files? Well, we can do that too. Unfortunately, it’s not a setting but there are some command line parameters available with SSMS.exe.
So let’s say I want to open SSMS with a query window and an object explorer connection both connected to my instance (local)\sql2016cs. First set the startup option to Open Object Explorer and query window then change your shortcut to the following:
ssms.exe -S "(local)\sql2016cs" -E
Now when you open SSMS both connections will automatically connect using Windows Authentication.
At work I open a solution and no connections. So I have my startup option set to Open empty environment like I said above and my shortcut looks like this:
<ssms path>\ssms.exe "<solution path>\SolutionName.smssqlproj"
None of these changes are going to make a huge difference during your day. But by customizing how SSMS starts up you can get started faster right at the beginning. And if your days start anything like mine do that’s nothing to sneeze at.