SSMS Color tab based on connection string / Environment
Asked Answered
P

2

7

SQL Server - SSMS

Can we change the SSMS query tab color based on connection string? Lets say I'm connecting to different environments Prod / Dev / UAT/ Test etc... or I want to group my servers based on some other criteria

enter image description here

Pietrek answered 18/12, 2018 at 16:57 Comment(0)
P
2

There are 2 way we can achive this

1st Option is inbuilt option that can be used to color the bottom of tab based on connection string we set

2nd Option is coloring tab at the Top ( I find this as very useful option since straight away alerts your eyes). My preferred choice.

enter image description here

ApexComplete is a free tool

This URL points to both the option

https://solutioncenter.apexsql.com/how-to-set-different-connection-colors-in-ssms/

Hope this helps

Pietrek answered 18/12, 2018 at 16:57 Comment(1)
This is no longer available from Apex for free. It's bundled in one of their suites and costs $$$. Apex offers "free trails" of their software if you are willing to talk to a sales rep.Corsiglia
B
6

Yes, you can do it without using any external tools. Just follow these steps in SSMS

  • Open Registered Servers tab from menu View (in my case Ctrl+Alt+G)
  • Right click on Local Server Groups then New Server Registration
  • In the openned window enter your connection info as well as an alias (LOCAL, UAT, RC, PROD, etc) in the Registered server name box.

enter image description here

  • Go to the tab Connection Properties. Choose your desired default database in the top. In the bottom of the window, check Use custom color and the choose a color.

enter image description here

  • Test your connection then save it.
  • Open a new query window then you should see the window like below.
  • Note: You should always connect to your server through Registered server tab in order to see your tabs in custom color mode.

enter image description here

Brio answered 23/6, 2023 at 15:2 Comment(0)
P
2

There are 2 way we can achive this

1st Option is inbuilt option that can be used to color the bottom of tab based on connection string we set

2nd Option is coloring tab at the Top ( I find this as very useful option since straight away alerts your eyes). My preferred choice.

enter image description here

ApexComplete is a free tool

This URL points to both the option

https://solutioncenter.apexsql.com/how-to-set-different-connection-colors-in-ssms/

Hope this helps

Pietrek answered 18/12, 2018 at 16:57 Comment(1)
This is no longer available from Apex for free. It's bundled in one of their suites and costs $$$. Apex offers "free trails" of their software if you are willing to talk to a sales rep.Corsiglia

© 2022 - 2025 — McMap. All rights reserved.