25

save change to the following items

Is it possible to configure SQL Server Management Studio (SSMS). so that the dialog box shown above does not appear when I close an unsaved query window?

Ario
  • 1,042
  • 4
  • 13
  • 27

1 Answers1

27

In SQL Server 2016 this is apparently coming.

The pre-release docs says

New option to skip prompt to save T-SQL files We have added a new option under "Tools|Options|Query Execution|SQL Server" to control if a prompt is shown for unsaved T-SQL files.

enter image description here

In previous versions there is no setting to suppress this warning.

A connect item was raised about this by Erland Sommarskog and closed as won't fix with the explanation.

Hello Erland -

I did a review with some of the other product teams and to stay consistent within our guidelines we're not going to be able to do this. Excel, Visual Studio and other products won't let you save with changed content, so we have to pop the message.

Thanks!

Buck Woody, SQL Server Program Manager

The Connect page is returning an error at the moment so here is a cached copy of it.

Glorfindel
  • 2,201
  • 5
  • 17
  • 26
Martin Smith
  • 84,644
  • 15
  • 245
  • 333
  • Another attempt to get this solved is at http://connect.microsoft.com/SQLServer/feedback/details/308372/permit-nameless-windows-that-do-not-need – Twinkles May 15 '14 at 15:37
  • 1
    I can confirm that this is option has indeed been added to SSMS 2016. – C-Pound Guru Jul 26 '16 at 18:39
  • 1
    Re: "stay consistent within our guidelines"... the problem with this response is, those guidelines are for documents, and we're not dealing with documents here. At least, query tabs conflate document and non-document use cases into one. Visual Studio will indeed let you close changed content without saving - in the watch / immediate panes. And that's the closest equivalent of how most people use the query tabs. I'm glad they're finally adding the option in SSMS 2016, but the correct fix would be to have the UI explicitly make the distinction between document and non-document modes. – PJ7 Sep 01 '16 at 14:05
  • 3
    this option doesn't seem to do anything anymore – johnDanger Mar 11 '20 at 21:04
  • Just tried it. The option exists in v18.10 but doesn't do anything – wischi Jan 21 '22 at 11:30
  • @wischi - I suggest reporting it on the uservoice site then – Martin Smith Jan 21 '22 at 11:33
  • The option only applies when closing SSMS, not individual windows/tabs/"documents". So, in this case, "on close" means on close of SSMS. v18.12 – fdomn-m Sep 07 '23 at 17:05