Color coding

  • honza.mf (10/15/2010)


    Do you like to obtain point without thinking?

    Not at all.

    But the answer as given doesn't depends on SQL, but on how you interpret the phrase "the status bar". I think it means "any status bar"; the author thinks it means "the status bar of the main window"; it could equally mean "the status bar of the query window", since it is only the query window that is connected to a server and hence the only one to which the question is relevant.

    It's not a SQLServer question, it's an ambiguous English Comprehension question.

  • Toreador (10/15/2010)


    honza.mf (10/15/2010)


    Do you like to obtain point without thinking?

    Not at all.

    But the answer as given doesn't depends on SQL, but on how you interpret the phrase "the status bar". I think it means "any status bar"; the author thinks it means "the status bar of the main window"; it could equally mean "the status bar of the query window", since it is only the query window that is connected to a server and hence the only one to which the question is relevant.

    It's not a SQLServer question, it's an ambiguous English Comprehension question.

    Yes, you are right. But is that one point worth for this discussion? For me it's a fly buzzing in my ears. Especially because it's not a SQL question, it's a question about a Microsoft tool.



    See, understand, learn, try, use efficient
    © Dr.Plch

  • The question itself is good, it poins to a not so well known feature in SSMS.

    But the answers, boy, does that suck. Pure trickery...

    It is like: "Hahaha, you knew you could color the status bar of a query window, but I didn't specify which status bar, so it is wrong. Nananananana." A bit childish...

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Assuming that this was not a trick question, I believe that the correct answer is 'it depends'. You can set the status bar for the query window to display a color based on the instance that you are connected to, but in order for this to work, you must connect through the registered servers tree. If you connect through the File|Connect Objects explorer method, the color of the status bar will be the default. Also, if you connect through the registered servers tree and change your connection to another instance, the status bar for the query window will retain the color of the instance originally connected to.

  • I think the question is kind of a tricky one, but many QoTD are tricky. I missed the point, but I did learn something...that you can color code the server connections/query window (status bar). I am regularly connected to 2 to 5 servers, and this is a useful tidbit of info. Thanks.

  • I too think the information presented is useful but the question was intentionally trying to make as many people as possible miss it. The purpose of the QOTD was met in that it shed some light on a relatively unknown feature. Unfortunately the ensuing discussion is about how the question was intentionally mislead instead of getting a discussion about how people use this. 😉

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Carlo Romagnano (10/15/2010)


    Thanks Hugo.

    I work with SSMS sql2500, too.

    Hmm, interesting sql 2500! Are you from the future? 🙂

  • This is absured and I will use the same logic Hugo used on the question about creating a table with []... How does the deception in this question help in anything we really encounter from day to day work?

    Where in the help document does it mark a difference calling one the query status bar and the SSMS status bar?

    All you proved sir is that people don't know the names of their status bars, if they even have proper names.

  • William Vach (10/15/2010)


    ...you must connect through the registered servers tree. If you connect through the File|Connect Objects explorer method, the color of the status bar will be the default. Also, if you connect through the registered servers tree and change your connection to another instance, the status bar for the query window will retain the color of the instance originally connected to.

    Since connection coloring is the only thing I use SSMS Tools for I was considering uninstalling it in favor of this. Unfortunately due to the fact that most environments I connect to aren't through registered servers and I do change the connection to other instances what SQL has built in won't work for me. Oh well.

  • I have been tricked!

    But, oh well....

  • William Vach (10/15/2010)


    Assuming that this was not a trick question, I believe that the correct answer is 'it depends'. You can set the status bar for the query window to display a color based on the instance that you are connected to, but in order for this to work, you must connect through the registered servers tree. If you connect through the File|Connect Objects explorer method, the color of the status bar will be the default. Also, if you connect through the registered servers tree and change your connection to another instance, the status bar for the query window will retain the color of the instance originally connected to.

    William,

    Please see my post on this thread earlier (2nd post in this thread) - there are TWO places to set the color.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • cfradenburg (10/15/2010)


    William Vach (10/15/2010)


    ...you must connect through the registered servers tree. If you connect through the File|Connect Objects explorer method, the color of the status bar will be the default. Also, if you connect through the registered servers tree and change your connection to another instance, the status bar for the query window will retain the color of the instance originally connected to.

    Since connection coloring is the only thing I use SSMS Tools for I was considering uninstalling it in favor of this. Unfortunately due to the fact that most environments I connect to aren't through registered servers and I do change the connection to other instances what SQL has built in won't work for me. Oh well.

    This is not accurate - there are TWO places to set the connection colors. See my earlier post (2nd post in this thread) that discusses this.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Misleading question. Should have said "New Query" not SSMS. Despite that, I learned about this feature from the responses to the poor question. Thanks!!!

  • Hugo Kornelis (10/15/2010)


    Carlo Romagnano (10/15/2010)


    I answered TRUE, but reading and re-reading both question and answer, I do not understand why it's false. Please Hugo, help us to understand.

    :laugh: I seem to have built a reputation for myself... :satisfied:

    A WELL DESERVED reputation - you have been very thorough, articulate and accurate in explaining other questions in the past.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Thanks for the information. I was not aware that you could also set the query window color through the connection dialogue box. I did discover a quirk when using that method. It looks like the color is associated with the instance entry in the drop down. If you are connected to an instance and then change to another instance that you manually key in, the status bar will retain the color of the instance that you were originally connected to and also change the color of the manually keyed in instance when you subsequently select it from the drop down.

    This QOD sure brought out a lot of discussion about a little known but useful feathre of SSMS.

Viewing 15 posts - 16 through 30 (of 43 total)

You must be logged in to reply to this topic. Login to reply