Applies to
Summary
This article describes how to set a custom connection color to a query tab in Microsoft SQL Server Management Studio (SSMS) using a feature called Tab coloring in ApexSQL Complete.
Description
Tab coloring can set custom connection colors for individual instances of SQL Server, down to the database level. SQL servers and databases can be assigned to a specific environment to help quickly identify which connection a tab is currently using.
Tab coloring
To associate a query color with a specific server node, go to ApexSQL Complete main menu in SSMS, choose the Options command from the submenu, and then select the Tab coloring tab:
Under the Tab coloring tab, select an available SQL Server instance from the Server drop-down list:
|
Quick tip: The list of available SQL Servers in the drop-down box depends on the list of SQL Servers connected to in the Object Explorer. Make sure that there is at least one active connection, or the Server drop-down list will be empty |
When a server is selected, the Database drop-down box shows all available databases for that specific server. From here, either select a specific database for which an environment will be assigned or simply assign to all databases by choosing the All databases at the very top of the list:
The Environment drop-down box has five built-in color presets for each environment. From here, choose between Development, Local, Production, Staging, and Testing environment:
Once the Server, Database, and Environment are set, the final step is to click the Add button and the newly created tab coloring rule is added to the list:
|
Quick tip: When a new tab coloring connection is added, and the Cancel button or the Close (x) button is clicked in the Options window, then the newly added connection will be discarded. Make sure to click the Save button after adding the connection or the OK button in the Options window |
From now on, all tabs connected to the AdventureWorks2012 database, on the DESKTOP-MQH0VFT\SQLEXPRESS server will be colored green, indicating that the active connection is to the Development environment:
Tab coloring feature helps in frequent work on many different servers and databases simultaneously by giving them a better overview of which connection they are currently using:
To delete a tab coloring rule, simply select the rule from the list and click the Delete button:
A confirmation message will appear that asks to proceed with the action. Just click the Yes button and the rule will be removed from the list:
To change server, database, or environment for a connection, select a tab coloring connection rule from the list, from the drop-down boxes make needed changes, and then click the Save button to apply them:
To edit environments and colors, click the Edit environments button and a new window will open showing the five built-in color presets for each environment:
To change the color of an environment, click any color from the Color column and the Color picker window will pop-up:
Pick any predefined basic color from the grid for the selected environment or click the More Colors button for more options:
To create a unique environment, click the New button and enter a name under the Name column. Optionally, change the default white color to any other following the previous step:
To delete an environment, select one from the list, and then click the Delete button:
A confirmation message will appear that asks to proceed with the action. Just click the Yes button, and the environment will be removed from the list:
If the selected environment is currently assigned to a server or database connection, the following warning message will appear:
FAQs:
Q: Where are the Tab coloring settings stored?
A: The Tab coloring settings are stored in the Options.xml file that can be found at the following location:
C:\Users\<user_name>\AppData\Local\ApexSQL\ApexSQLComplete
Q: Can I edit the Tab coloring settings outside the host application (SQL Server Management Studio and Visual Studio)?
A: Yes. The settings are stored in the Options.xml file and a simple text editor can be used to preview and edit settings.
Information about environments is stored between the <GlobalEnvironments> tags:
Information about Tab coloring connections is stored between the <GlobalTabColorings> tags:
Q: If I click the ApexSQL defaults button from some other tabs what will happen with tab coloring connections that I’ve created?
A: Loading defaults does not affect user defined tab coloring connections and colors.
Q: There was an update available, I downloaded it, and during the installation process it says that previous versions of ApexSQL Complete will be removed from my computer. What will happen with tab coloring connections that I’ve created?
A: The update process does not affect user defined tab coloring connections.
Q: Can I copy tab coloring settings to another machine e.g. share them with my colleagues?
A: Yes. Use the Export option in the Options window and save all user settings to an .xml file that can be imported on any machine where ApexSQL Complete is already installed. Bear in mind, this option saves all user settings, not only Tab coloring.