How I Configure SQL Server Management Studio

Ever go into Tools-Options? SSMS has a stunning number of options these days. Here are some of my favorites:

Documents options

On the Documents options, I uncheck “Check for consistent line endings on load” because I constantly get scripts with all kinds of wacko line endings. That warning is a pain in the butt.

On the Fonts and Colors options, I used to get fancy. There are all kinds of “best programming fonts” articles out there with great-looking fonts. However, when I did screenshots for presentations or clients, people kept asking, “Why does your SSMS look so weird? Is it because you’re on a Mac?” These days, I leave those options at their defaults.

Query Shortcuts screen

On the Query Shortcuts screen, you should set up shortcuts for the scripts you run most often. I don’t – but it’s only because I have a wacko job as a consultant. I’m constantly jumping into an SSMS on someone else’s desktop, and they won’t have the shortcuts set up, so I don’t wanna develop muscle memory for something I won’t have access to. If I was you, though, dear reader, I’d set these up.

Startup options

On startup, SSMS defaults to just opening Object Explorer. I like to open a query window too, though – after all, I’m probably opening SSMS to run queries.

Tabs and windows setup

Under “Tabs and Windows,” check the box for “Show pinned tabs in a separate row.” This way, when you click the pushpin on a given tab, he pops up to the top like this:

Pinned tab

I love that for frequently-used tabs – I might have a dozen query windows open, but I keep coming back to, say, the window with sp_WhoIsActive open. I save that tab with a recognizable query file name, and then when I pin it, it pops up to the top in that separate row.

Speaking of which, those default tabs are hideous – go to Text Editor, Editor Tab and Status Bar:

Editor Tab and Status Bar

Scroll down to “Tab Text” and set everything to False except for “Include file name.” When you click OK, it doesn’t take effect on existing tabs, but after you close & reopen them – ahhh, much more legible. Check out how many more tabs you can fit on a screen:

Tabs, compacted

Next up, going back a little in Text Editor, go to All Languages, Scroll Bars:

Scroll Bars

The default behavior is bar mode, but if you change it to map mode, you get a text map down the right hand side scroll bar. I don’t find that all that useful, so I don’t enable it, but if you’re the kind of person who has long stored procs, you might. The really cool part is when you hover your mouse over the scroll bar map on the right, you get a little zoom popup so you can see a preview of the code at those lines:

Zooming on the scroll bar

I don’t set mine up that way, but I can see why people do, and if you’re reading this post, you’re probably interested in that option. Anyhoo, moving on to All Languages, Tabs:

Losing my religion

SSMS defaults to tabs, and so I switch it to “Insert spaces.” Insert religious flame war here. Moving on….

T-SQL, General

Under Transact-SQL, General, I check the box for “Line numbers.”

Query Execution, Advanced

I would just like to point out that no, I do not set my deadlock priority to high. As far as you know.

Results to Grid

Under Query Results, SQL Server, Results to Grid, I change my XML data size to unlimited so that it brings back giant query plans. (Man, does my job suck sometimes.)

A lot of presenters like to check the box for “Display results in a separate tab” and “Switch to results tab after the query executes” because this gives them more screen real estate for the query and results. I’m just really comfortable with Control-R to hide the results pane.

Designer jeans

Under Designers, I uncheck the box “Prevent saving changes that require table re-creation” because I never just hit save when I make changes in a designer anyway. I always click the generate-scripts button, but strangely, you can’t even generate scripts when a table re-creation would be required. Personally, I’m a big fan of recreation. Also, parks.

Object Explorer drag and drop settings

Under Object Explorer, Commands, I change “Surround object names with brackets when dragged” to False. I usually find that when I’m dragging an object from the OE pane over into a query, that I specifically need it without brackets for some reason.

After I’m done in Tools, Options, I go into View, Toolbars, Customize. Click on the Commands tab, then choose Toolbar, SQL Editor:

SQL Editor Toolbar

These are the buttons that get shown when you’re working with T-SQL. I click on the Debug control, take a deep breath, and while I’m clicking the Delete button on the right hand side, I scream at the top of my lungs, “WHO THE HELL THOUGHT IT WAS A GOOD IDEA TO PUT THIS BUTTON RIGHT NEXT TO EXECUTE?!?!?”

I have less passionate feelings about the rest of the buttons, but I still end up deleting most of them. I don’t really need a button for Query Options or IntelliSense, and I like a clean, minimal UI. After I’m done cleaning out the SQL Editor toolbar, I click the toolbar dropdown, choose the Standard toolbar, and clean that out too. No, I’m never starting an Analysis Services DMX Query. I certainly don’t need buttons for copy or paste. (The only reason I even leave “Execute” as a button is because sometimes I like showing training class attendees that the execution is about to start.)

Minimal toolbars

The end result is a much smaller set of buttons, and they all fit on a single row even when I’m editing queries.

Previous Post
A Query That Should Be Contradicted
Next Post
Wait Stats Should Be Easy By Now

44 Comments. Leave new

  • I used to set my font for SSMS to Terminal, mostly because I like how it looked like an old-school green-screen terminal.
    Sadly, MS took that font away from us.

    Reply
  • I always recommend setting the Query Governor Option to 20000, just in case.
    Then I keep a snippet for removing the option via TSQL
    SET QUERY_GOVERNOR_COST_LIMIT 0;

    Reply
  • Steve Malcolm
    August 1, 2018 1:09 pm

    Great tips, these. The ones I don’t already use, I am trying.

    Reply
  • Any tips for Sam’s plugins and their ideal configs?

    Reply
  • Chandram Venigalla
    August 1, 2018 9:31 pm

    Thanks for the tips Brent

    Reply
  • Dan Thompson
    August 2, 2018 3:48 am

    Great tips Brent! My favourite is: Under “Tabs and Windows,” check the box for “Show pinned tabs in a separate row.” I use this all the time for regular scripts such as WhoIsActive & sp_Blitz bits. My only bug bear is that upon closing SSMS and reopening the pinned tabs are no longer on their separate row. Not sure if this is SSMS or Redgate tools (all my tabs reopen when I start SSMS)? Thanks SQL Dan

    Reply
  • Alexandre Jobin
    August 2, 2018 8:46 am

    Is there any way to share registered server to the dba team? Presently, i have to export my registered servers to a file and ask my team to import it.

    Reply
  • is there anyway to change the font to wingdings for the query window? asking for a friend that is 100% not “helping” a guy install SSMS that requested “administrator access for sequel server”

    Reply
  • Any idea why [sql server object explorer]/[scripting] options keep getting reset? Seems like every week I have to change “script permissions” and “script indexes” to TRUE. They keep getting set back to FALSE.

    Reply
  • In an ideal situation you could save these settings and reimport them as needed when you get a new desktop management machine (or publish a blog post on your recommendations)

    Reply
  • Any idea if there is a way to change the generated scripts to default to SORT_IN_TEMPDB = ON and / or ONLINE=ON?

    Reply
  • useful tips man!

    Reply
  • And if you’re configuring someone else’s SSMS – someone you don’t like:

    Change the batch seperator from GO. Changing it to SELECT can be fun.

    Change the error text colour to white.

    Just those two above can be hours of fun.*

    * Or very very unprofessional, to say the least. 🙂

    Reply
  • What type of Query Shortcuts would you set up? I have had sp_WhoIsActive set up for years, but have never really figured out what to use the other keys for.

    Reply
    • Shortcuts can be powerful because of the context–they append whatever you have highlighted.
      Some generic shortcuts I use:
      * select top 1000 * from
      * exec sp_executesql N’xp_readerrorlog’;
      * select [schema] = s.name,[table] = t.name,[column] = c.name from sys.schemas s inner join sys.tables t on s.schema_id = t.schema_id inner join sys.columns c on t.object_id = c.object_id where c.name =
      * exec sp_executesql N’select name = case c.column_id when 1 then ”” else ”,” end + case when charindex(”-”,c.name) > 0 or lower(c.name) in (”status”) or charindex(” ”,c.name) > 0 then QUOTENAME(c.name) else c.name end ,datatype = typ.name ,c.max_length ,c.[precision] ,c.scale ,c.is_nullable ,c.is_identity ,c.is_computed ,c.column_id from (select object_id,schema_id,name from sys.tables union all select object_id,schema_id,name from sys.views) t inner join sys.columns c on t.object_id = c.object_id inner join sys.types typ on c.user_type_id = typ.user_type_id where t.name = replace(replace(@table,”[”,””),”]”,””) order by t.schema_id, c.column_id ;’,N’@table varchar(100)’,
      (yes, you can get pretty crazy with the shortcuts)

      Reply
  • Any tips for making it launch faster on Windows 10? Always takes around 30 to 45 seconds to launch. Tested on multiple Win10 machines with and without AV running.

    Reply
    • No, I don’t use Windows 10. (Had to install it on a VM for the first time this week for a client gig, and I recoiled in horror. Man, that thing is full of crapware.)

      Reply
    • Shut down SSMS.
      Go into IE, select Tools|Internet Options|Advanced
      If “Check publisher’s certificate revocation” under the security node is checked, then uncheck it.
      that worked for me.

      Reply
  • Thanks for the tips Brent!

    Reply
  • […] How I Configure SQL Server Management Studio Interested how Brent Ozar (t) does configure his SSMS? […]

    Reply
  • […] There has been many a blog post out there that shows you some of the great ways you can customize the look and feel of your management studio windows. One of my favorite recently published ones is from the great people at Brent Ozar Unlimited (Brent himself in this case) here. […]

    Reply
  • […] There has been many a blog post out there that shows you some of the great ways you can customize the look and feel of your management studio windows. One of my favorite recently published ones is from the great people at Brent Ozar Unlimited (Brent himself in this case) here. […]

    Reply
  • Dominique Boucher
    November 26, 2018 9:26 am

    Strangly, from time to time, all my modification to the SSMS configuration are lost and I got all the “by default” config back.
    I couldn’t find any explanation as my profile (where the configs should be saved) haven’t been deleted.
    As the export/import feature does not seems to work either, I end up doing all my config manually 😮

    Any taught ?

    Reply
  • While using Always on Read only replicas, developers had to manually go into options tab select database name and then go to connection properties tab to mention “applicationIntent = ReadOnly”..
    Can we automate it …. or somehow add this to registered server settings ??

    Reply
  • Does anyone know of a keyboard shortcut to disable intellisense and then turn it back on while typing queries?
    Thanks…
    Mike

    Reply
  • Hey Brent – how do you get rid of the super annoying green squiggly lines. I believe they are intellisense warnings.

    Reply
  • Douglas Osborne
    April 11, 2019 10:28 am

    In SSMS v17.9.1, how do you turn off the Output window at the bottom of the screen at startup?

    Great suggestions, I gained an entire line on my screen cleaning up the buttons.

    Reply
  • Do you know where Copy with text format go?
    When I copy from SSMS to an email it just go as plain text without formatting.
    It used to be under Options -> Editor -> Behavior, but that doesn’t exist anymore.

    Thanks !

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu
{"cart_token":"","hash":"","cart_data":""}