SQL Server – Importing Specific vssettings File When Launching SSMS

sql serversql server 2014ssms

In the interest of disambiguating between when I am connecting to non-production and production, I utilize vssettings for a specific theme in Management Studio (fire-and-brimstone style when in prod, calming blues in non-prod).

Previously our non-production access was via one account, and our production access was via a more restricted account. With that method I was able to set a theme for each account one time and all was well. Now all access is using the elevated account.

Is there a way to tell SSMS at launch time to use a specific theme? Or a programmatic way to do this without going through "Tools > Import and Export Settings" every time? I'm using the SQL 2014 version of SSMS.

Thanks.

Best Answer

I haven't played with themes, but you can set per-connection properties, including the color of the connection info bar at the bottom of the query tab. And these settings are saved.

If you have a query tab open, go to "Change Connection" (either the button in the button bar, or via the Query menu, top item should be Connection >, and when it pops up the "Connect to a Database Engine" dialog, click on the Options >> button. Go to the Connection Properties tab and the bottom option is Use custom color:. Check the check-box for it and click on the Select... button on the right.

Just use different colors for the different servers/environments.


Technically speaking, there is a means of programmatically interacting with SSMS: write a plug-in / extension. I will list some resources below that deal with this topic. I have not tried it yet myself, but it seems as though it might be a lot of effort for a one-time config update. On the other hand, if SSMS will not record the setting for 100, let alone 400, separate connections (not sure what the limit is), then maybe this would be worth the effort.