SSMS shows 'Querying transaction count' on closing the query window

Viewed 7354

My job usually involves starting SSMS in the morning. There are multiple query tabs open at any given time during the day. At the end of the day when I go to close them I get this window

Query Transactin Count

This did not happen with earlier version of SSMS. Is there a setting which enables/disables this?

Running SSMS v18.11.1.

Thanks in advance.

5 Answers

I had the same issue. In my case, I knew I had lost my connection and I restarted for a clean connection, but every SQL window does this upon closing it. Since I had lost connection, I had to wait for it to time out for every window that I had open. I have found that manually clearing the windows makes it quicker, but I'd like to disable this query transaction count, so it does not try to run when closing every window. This started after the last updated version of the tool.

Not a solution, but if I disconnect the query before closing the tab I don't get the popup. I added a disconnect button to the toolbar to make it less intrusive.

And I've since assigned the keys so Ctrl-Shift-F4 to disconnect and Ctrl-F4 to close so that makes multiple tabs less annoying.

I believe that will happen upon losing connection and then attempting to close out query tabs. Try verifying your login credentials and ensuring you are connected before closing them out.

I usually right click on in the query window, go to "Connection" and then click "Disconnect All Queries" to disconnect all and then you can close SSMS.

See Here

1

Enabling Show Miscellaneous files in Solution Explorer from the following menu fixed this incredibly annoying problem for me.

Tools > Options > Environments > Documents

If you have that setting disabled as a work-around for copying from the Find & Replace dialog or SQL Search, then you'll have to pick your poison.

Related