Floating or vertical results pane in SQL Server Management Studio

20

3

I have a multi monitor configuration and would like to be able to have my query editor on one monitor and the results pane on another.

Can this be achieved? Either by having the results pane vertically attached to the query editor instead of horizontally, or by having the results pane float completely separate from the query editor.

I am using SSMS 2008 R2 and can upgrade to 2012 if this is a new feature.

My current workaround is to have 2 SSMS instances open, both with the same .sql file open.

I make changes to one and save it, then switch to the other instance which prompts me to reload the script and I can then execute it with the results pane filling most of the monitor.

Shevek

Posted 2012-11-06T15:53:21.840

Reputation: 15 408

I don't have the environment for it, but can't you just drag the result windows out of SSMS and to the other monitor? – harrymc – 2013-09-06T19:42:20.757

not that I have found, SSMS does not seem to be MDI. Hence this question! – Shevek – 2013-09-07T22:01:36.603

Look in the Tools menu / Options / Environment folder / General, if you can set "MDI environment" and relaunch SSMS. (source)

– harrymc – 2013-09-08T06:00:00.317

Apologies, MDI was the wrong term to use. The problem is that the Results pane is docked to the Query pane - I want to be able to have them separate, Query pane on monitor 1, Results pane on monitor 2. – Shevek – 2013-09-09T11:16:28.067

I think you will have to upgrade to a later version of SSMS. – harrymc – 2013-09-09T12:18:20.093

Also does your SSMS have in menu Tools -> Options -> Query Results -> Results To Grid -> Display Results in Separate Tab. – harrymc – 2013-09-10T10:15:59.367

The Display Results in Separate Tab option is there but the tab is not able to float separate from the Editor tab - not in MDI or Tabbed environment setting – Shevek – 2013-09-10T15:43:21.147

I believe that later versions of SSMS work in a more general manner. Won't hurt to try, even in a VM. – harrymc – 2013-09-10T17:20:50.823

1I have now installed SSMS 2012 and can confirm that it behaves in exactly the same was as 2008 R2, so it is not a solution to this problem – Shevek – 2013-09-17T12:58:02.357

Then there is probably no solution, except your workaround. – harrymc – 2013-09-17T13:13:02.390

Try to run separate SSMS in other window. There will be two SSMS windows but you can achieve what you need. Just connect to the same server and database. – pbies – 2013-11-27T23:35:52.153

@pmbiesiada please re-read the question, specifically the last 2 paragraphs. Your suggestion is exactly my existing workaround! tx anyway! – Shevek – 2013-11-28T07:23:45.217

not sure I understand your problem. I know in 2008 I couldn't move tabs outside the SSMS window, so what I did was expand the SSMS window (not maximized) to cover two monitors, and then I could move each tab to a different monitor. In 2012 I can now move tabs outside the SSMS window so I don't need to do that anymore. – Rodolfo – 2014-01-14T21:40:37.613

@Rodolfo - yes, you can float the tabs but that takes the Query & Results panes TOGETHER. What I want is to be able to separate the Results pane from the Query pane and have them on separate monitors. Being able to switch to vertical split would also achieve this as I could then spread that over 2 monitors. Neither of these options is available in SSMS up to and including 2012. – Shevek – 2014-01-15T17:46:36.250

@Shevek Oh, I see the problem now, yes I don't think you can do that as SSMS would not know which result window belongs to which query window, they're really just one window with a separator. Like you say, if you could make the separator vertical it would work, but alas, don't think it's possible – Rodolfo – 2014-01-15T21:11:43.113

I played around with 2012 for 10 minutes trying to figure out a way to do it (it would improve some of my workflow as well) with no success either. – Andrew M. – 2014-01-23T01:19:26.453

2It's such a small thing. Multiple monitors is so common nowadays, especially for devs. Everyone on our team has at least 2, most have three (I have 4 :D)... This would be such an awesome feature. – Shevek – 2014-01-24T07:29:40.963

We have 2 by default here by I think 3 is the most efficient for most people, shame its not more standard – Coops – 2014-02-13T10:18:25.707

I'm actually finding 4 to be the sweet spot. 1 = Outlook / IM, 2 = SQL, 3 = IDE, 4 = Output – Shevek – 2014-02-14T11:41:31.527

Answers

12

Unfortunately the results pane can only be attached horizontally to your current editor window, this means there is no way to detach it and to move to another screen.

However, one improvement of SSMS2012 over 2008 is that you don't need to have two instances of it opened now to use several monitors: you can undock the editor window and drag it over to a second monitor.

Unfortunately, you can't duplicate the same query or re-open it. So, having two instances might be still an optimal solution for you. I am just used to quickly press

  • Ctrl-A (select everything in the editor window),
  • Ctrl-C (copy to clipboard),
  • Ctrl-TAB (switch to pre-last [data] window),
  • Release Ctrl briefly
  • Ctrl-A (select the complete content of the second, data window),
  • Ctrl-V (replace the content with the new content from),
  • F5 (to refresh the data)

It might seem long, but most of the sequence is done just with you minimal finger keeping Ctrl pressed, and for those who are experienced in computer fighting games this just reminds one of the "fatality" combos :)

Alexander Galkin

Posted 2012-11-06T15:53:21.840

Reputation: 998

11

At least in the newer Visual Studio 2015, you can use the interface to work against a database, and have the results vertically, to the right. Just work through the SQL Server Object Explorer, and open the script, or start a New Query. You'll find a small icon with a vertical line between the script, which will switch the results to a vertical orientation, buying you precious screen space, especially if you use an ultrawide, like I do.

enter image description here

Null Pointer Expert

Posted 2012-11-06T15:53:21.840

Reputation: 111

3

If it is a sql script you are editing you can edit the file from a different application save changes, refresh and reload your results. That way your results can be in their own window.

I'm using sublime on one screen and SSMS on another with the results pane moved toward the top of the window.

One downside with this is that it doesn't auto-refresh when I save so I have to manually accept the changes made each time I save but it is not too bad.

John Forbes

Posted 2012-11-06T15:53:21.840

Reputation: 131

Works in VS 2017 as well. Thanks! – Oleg Melnikov – 2017-10-25T19:19:12.693