Wanted to share a few settings in Microsoft SQL Server Management Studio (SSMS) that I find useful. I may share a few that can be downright diabolical if used to teach a coworker not to leave their workstations unlocked and unattended! “For shame! For Shame! For Shame!” -Gomer Pyle
All of these settings will be found under Tools > Options…
> Environment > Fonts and Colors
I like to change the Size: for
– Text Editor
– Grid Results
Note: setting Item foreground: color to White could be considered diabolical.
> Environment > Tabs and Windows > Pinned tabs
– Turn on Show pinned tabs in a separate row
> Text Editor > All Languages
– Turn on Line numbers
> Scroll Bars
– Set Behavior to Use map mode for vertical scroll bar
> Text Editor > Editor Tab and Status Bar > Tab Text
– Turn off everything but file name
> Query Execution
– Turn off Prompt to save unsaved T-SQL query windows on close.
Note: It really helps to have Redgate SQL Prompt in the event you really didn’t want to close a tab…
Now for a few that can be useful in certain cases; but really shine for for wasting time and infuriating coworkers…
Let’s start with this one:
> Query Execution > SQL Server > Advanced
– SET NOEXEC
This can be very helpful if you routinely write/run queries in a production environment and want to make sure you do not accidently run an entire script…
No comments on developing ad-hoc queries in production… LOL Because we all know it happens… And for someone that doesn’t know this exists… Muhahahahaha!
– Disconnect after the query executes
It does just that… Execute one query and the tab gets disconnected! LOL
Together these two make an excellent one-two punch!
> Query Results > SQL Server > Results to Grid
– Turn on Discard results after execution.
– [Include column headers when copying or saving the results] could be useful if you happen to do this frequently
> General
– Default destination for results: Setting the dropdown to “Results to file” is interesting too…
Last one for this post. Those familiar with it may have seen others talk/comment about it…
> Query Execution > SQL Server > Set Batch separator: from GO to SELECT
Try troubleshooting the error message:
A fatal scripting error occurred.
Incorrect syntax was encountered while parsing SELECT.
Leave a comment