Visually distinguishing between environments

Peter Schmitz

Administrator
Staff member
Have you ever been active on multiple servers in SQL Server Management Studio (SSMS), typed a command, only to realize just in time (or maybe too late) that your code would be executed on a different environment than you intended? With SELECT statements, this might not be a big issue, but imagine something like a DROP TABLE statement being executed on Production, rather than on Development like you intended.

203


To avoid this, a fairly simple trick is to assign different servers with custom colours. To do so, when you connect to a server in SSMS, use the Connection Properties tab:

204


On that tab, check the box "Custom color", and click the Select button to assign a custom color. In this case, for DEVI assigned it with a green color:

205


When you then use the "Connect" button, the bottom of SSMS will show the selected color:

206


I typically assign green to my DEV environment, leave TEST yellow, and add red for my PROD environment:

207


Once this is configured and you consistently use this, it reduces the risk involved with accidentally running queries in the wrong environment.
 
Top