Friday, September 14, 2012

SQL Editor “Presentation View”

I’ve often been frustrated by the lack of real estate in the standard SQL query window. Once the query has been run, the results eat up half of the screen, and if you have multiple grid view results from multiple queries in a batch, it can be difficult to examine all of the data without fighting with the UI to let you move the dividing line up.
Here’s what you often see:
image
I noticed during an online training session with Paul Randal (blog | twitter) that he was using a set up for his SQL query window that to me was more practical – it had the editor in one tab and the messages / other tabs next to the editor rather than below it.
Like this:
image
It took me a bit of searching and testing, but I finally located the setting and decided to document it here so I wouldn’t forget where it was again.
From the main menu, click on Tools then select Options…. Once the Options dialog pops up, expand Query Results > SQL Server > Results To Grid. In the list of settings, check both “Display results in a separate tab” and “Switch to results tab after the query executes”. Then click [OK].
image
SQL will save your settings and next query window you open will use the new view.
In addition, in the Options dialog, you may wish to change the font size. That setting is under Environment – Fonts and Colors. I’d only have it large for presentations where I have enough long queries that I need to display a large section of the window. For ones with smaller queries, I’d use “Zoom-it” because I can zoom in on the text I’m talking about and then zoom back out when finished. Zoom-it also lets you annotate the zoomed in window with drawn lines or additional text in various colors. The annotations disappear when you zoom back out, but they’re handy for pointing out key information.
Happy presenting!

No comments:

Post a Comment

Resoved: Error Creating Storage Event Trigger in Azure Synapse

My client receives external files from a vendor and wants to ingest them into the Data Lake using the integration pipelines in Synapse (Syna...