[SSMS] Make color coding of query windows work all the time - by Jamie Thomson

Status : 


Sign in
to vote
ID 504418 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 10/27/2009 5:28:11 AM
Access Restriction Public


The color-coding feature for query windows (as defined in the properties of a registered server) in SSMS2008 is a really cool feature, I use it all the time.

However, there is a problem because it only works when the query window is ultimately opened from Registered Servers.

If (for example) a new instance of SSMS is opened up and a query window is opened by clicking on the 'New Query' button then there will be no color coding - because the query widow was not instigated from "Registered Servers" pane.
Sign in to post a comment.
Posted by Leona Li on 6/30/2016 at 6:12 AM
This seems to work better in SSMS2016, but it's still not completely fixed. If I have a Query window open and right click Connection/Change Connection, I have to go into Option and uncheck the Use Custom Color option on the Connection Properties. If don't uncheck this every time, it retains the color of the original connection. Unchecking the option does result in the correct color, whereas previous versions would set the color to the default.
Posted by JFoushee on 12/3/2015 at 7:59 AM
Would like to know how to reset this feature... I've removed all Registered Servers, yet the color-coding shows red for every server I connect to.
Posted by SQL_Monkey_J on 8/17/2011 at 11:33 AM
Nice -- just updated to SQL2k8r2 SP1 and yes, the color bar does work --- but, custom colors defined by using the "Select" button to the right of the color swatch do not....
Posted by Jamie Thomson on 8/11/2011 at 7:53 AM
cool, thanks Sanjay.
Posted by Microsoft on 8/10/2011 at 9:37 PM
Hi! Jamie, thank you for writing to Microsoft.

This bug and a related connect bug (https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=361832) have been fixed in SSMS in SQL Server 2008 R2 SP1. Unfortunately, the fix did not make it in time for SSMS in Denali CTP3 and will be available in a subsequent release. Meanwhile, please take a look at SSMS in SQL Server 2008 R2 SP1 and tell us if the color coding scenarios reported in the connect bugs are working as you expect.

Sanjay Nagamangalam
Principal Program Manager, SQL Server Manageability
Posted by Sideout on 12/5/2010 at 5:44 AM
While looking at this comment, please also consider coloring both the top and bottom of the window:

Posted by Peter A. Schott on 12/1/2010 at 12:21 PM
It also doesn't work correctly if you change connections. Start on your local machine, make a change. Change Connection to a production box that has a color code of red and notice that the color stays with whatever had been used for the first connection. This would be a great feature if it worked consistently across connections.
Posted by Simon Sabin on 3/26/2010 at 8:16 AM
It also fails to work if you modify a stored procedure. How awful.
Posted by MJS2010 on 3/8/2010 at 1:26 PM
I agree that the color of the status bar should always reflect which server you are connected to, regardless of how you opened the query window, and how you established the connection.

Hopefully, if the similar bug listed in Jamie's comment is fixed correctly, this bug will implicitly be fixed and will go away.
Posted by Jamie Thomson on 11/30/2009 at 3:06 AM
You should consider this bug in conjunction with another very similar one: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=361832
Posted by Jamie Thomson on 10/27/2009 at 5:31 AM
Please leave a comment, especially if you disagree.