Use custom colors to differentiate between environments10-12-2018 0 Comment(s)
During our day to day work in SSMS, generally we have to shift between different environments – Local/DEV/QA/MOCK/PROD, resulting in the creation of multiple query tabs – with each query tab connected to different environments. This often becomes unmanageable and difficult to keep track of. Also, think about a scenario when you have a data manipulation script to be executed in different environments, isn’t it a big advantage to have a visual differentiation between the environments you are executing your scripts against?
SSMS provides us with an ability to set different colors for connection to separate environments. Personally, I prefer to set the below colors for my environments —
PROD – Red, MOCK – Orange, QA – Yellow, DEV – Blue and Local – Green
The color is displayed in the SSMS status bar, at the bottom. Hence when you connect with a particular environment, it uses the same assigned color. This presents a visual indication of the environment in which you are running your scripts.
SELECT 'Local DB for Update/Delete/Insert' AS 'Environment'
SELECT 'DEV DB for Update/Delete/Insert' AS 'Environment'
SELECT 'PROD DB for Select' AS 'Environment'
Once you select a color for an environment, every time you login to that SQL Server instance – it will display the same color in the SSMS status bar. For developers running data manipulation scripts, it’s always nice to have a visual indication of the environment you are logged in – especially a RED color in your SSMS query editor, indicating you to be extra cautious.
No Comments to Show