An annoyance with Management Studio

I am probably speaking out of turn here (it is not Saturday, after all), but I was really annoyed with this SSMS grid problem today, and had to get it off my chest.  I was waiting for a log restore to complete, and periodically running sp_who2 to determine IO completed thus far.  I could have written a query against the DMVs but might have been hit with the same issue.  Essentially, the problem is that the grid alignment in the results pane of SSMS is horrible and often guesses wrong.  What this yields is a lot of data that is obscured by ellipses because SSMS decided that it would make a column 60px wide when 65px would have shown all of the data (and plenty of cases where it makes a column 200px wide when 60px would have been enough).  In this specific case, of course, it was particularly annoying: it consistently obscured only one value in the entire grid: the one I was interested in!

So what did I have to do?  Every time I ran the query to check on the result, I had to drag or double-click on the column header boundary in order to show the whole value.  This is the epitome of annoying.

SSMS can be SO annoying 

Now I complained about grid alignment last summer, and due to my frustration today, will likely include a reference to this item in this week's Connect digest.  But in case you want a sneak preview:

#356926 : SSMS : Grid alignment, column width seems arbitrary

File Attachment: SSMS_Annoyance.zip

Aaron Bertrand

I am a passionate technologist with industry experience dating back to Classic ASP and SQL Server 6.5. I am a long-time Microsoft MVP, write at Simple Talk, SQLPerformance, and MSSQLTips, and have had the honor of speaking at more conferences than I can remember. In non-tech life, I am a father of two, a huge hockey and football fan, and my pronouns are he/him. If I've helped you out, consider thanking me with a coffee. :-)

9 Responses

  1. DanK says:

    Don't know if you found the answer yet.  I was having the same problem in SSMS 2012.  
    The cause: I changed the font in the result grid.
    The Fix: Change the font to Microsoft Sans Serif 8 pt.  

  2. dim says:

    You could trick it a little bit by specifying custom column header but yeah, it's annoying.

  3. AaronBertrand says:

    RayG, in many cases if I switch to results to text, some of the data I was looking for was actually off the screen to the right, so still required manual intervention to be on the screen.  I like the grid because it makes data a little more compact, it just makes funny decisions to do so in weird places.  I also like the grid because it turns multi-row data into single-row.  Ever try results to text when any of your columns have carriage returns?
    Results to text has its place (e.g. sp_helptext), but when you have may columns and you really want to look at the data in a tabular format, it's not the way for me.

  4. RayG says:

    You could switch to "results to text" just for the purpose of the query.  Avoids the problem, but yes, annoying.

  5. Linchi Shea says:

    Aaron;
    I posted my previous comment before actually finishing it. Not to diminish it, I meant to say that there probably would be a long list of items before this one in terms of the degree of annoyance.

  6. RowlandG says:

    Where's TOAD when you need it πŸ˜‰

  7. Linchi Shea says:

    I don't know. You complain too much, Aaron πŸ™‚ That seems to be a rather minor annoyance compared to such issues as the completely unusable query window tabs.

  8. AaronBertrand says:

    Well, this system doesn't yet have your solution in place.  πŸ™‚
    In any case, the same thing could happen with it; SSMS is blindly determining column widths based on some initial subset of the data.  Boo!
    And please don't suggest switching to Results to Text.  I would complain a lot more about that than the grids.  πŸ™‚

  9. cinahcaM madA says:

    User error! Your mistake was running sp_who2 when there are other options that don't have this problem <g>