I'm not sure if this is a bug related to Azure data studio or if there is something else that's causing this but I'm getting the error "Query failed: The connection does not support MultipleActiveResultSets." when I'm trying to execute a simple SQL.
The SQL that I'm executing is:
SELECT TOP (1000) [Id]
,[UserId]
,[CreatedOn]
,[CountryId]
FROM [dbo].[TargetLocation]
Steps to Reproduce:
I solved this closing and reopening Azure data studio.
Version info:
Version 1.2.4
Commit 1ebfd0235690ad044ed2874a02e65188f5fea01c
Date 2018-11-02T21:50:52.634Z
VS Code 1.26.1
Shell 2.0.9
Renderer 61.0.3163.100
Node 8.9.3
V8: 6.1.534.41
Architecture x64
Is there any chance you had the query window open and connected for a long time before running the query that returned this error, or that there was something else that might have caused your query to get disconnected for some reason?
I've seen this error message once or twice lately and I think it has something to do with our recent changes to make query tabs more resilient to getting unexpectedly disconnected, but am not entirely sure how to reproduce it
Yes, If I'm not wrong the query window was open for at least 15 minutes.
I executed this query then did some other stuff here and after some time tried to execute it again receiving this error.
In Management studio, the same behavior is noted - however, on the second attempt to execute the query automatically reconnects to the previous datasource. Can that functionality be mirrored here?
Seconded. We first get an error re: 'connection closed' and then get this error on re-attempting to run the query. We can never come back to queries after more than 10 minutes or so, we have to close the tab and start a new one in order to establish a connection again.
Same as @NickyClark1, after a while, the above happens. Reconnecting doesn't help. Opening/closing the file (in this case, an ADS Notebook) solves the problem.
Same as @williamadba, getting the "Query failed: The connection does not support MultipleActiveResultSets." error on the default "SELECT TOP 100 FROM" query in a notebook. Disconnecting, reconnecting does not help, only restarting ADS helps.
Azure Data Studio
Version: 1.8.0
Commit: 96e214593190071f0b520439929b218f9fa673de
Date: 2019-06-06T01:36:06.858Z
VS Code 1.34.0
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 5.0.0-20-generic
I'm constantly having the same problem, both connected to Azure SQL Databases and internally-hosted MSSQL instances.
Having the same issue. Any updates here?
Also having this issue, querying an SQL Server hosted on Azure, using the MacOS app.
If I attempt the query a third time, then the tab itself closes and an error message is displayed in the bottom right that reads: "Unable to open 'SQLQuery_3 -
This renders Azure Data Studio almost worthless to me, which is frustrating since we are on a completely Microsoft infrastructure.
Same here as everyone else. Nowadays I don't wait for the error anymore, if I leave a tab unattended for more than 5 minutes then I proactively close it and right click database > new query again. This seems like a basic functionality that should be sorted out IMO.
Any way this can be fixed? This may seem trivial to other users but I run into this problem constantly as I am developing full stack. I spend all day with Azure open writing stored procedures and front end code so my same files stay open all of the time. I would move to another SQL editor but Azure seems to be the only one that supports Windows Authentication through Kerberos
This error could occur when a connection to the database is being established, but at the same time, other threads are trying to run the Connect() method as well. I think it could probably be solved with a semaphore or a mutex.
I Having the same issue. To resolve, I having than open a tab 'new query' to run the query and reconnecting to database. That's much frustrating.
There's no nothing to resolve this problem ?
I'm also having the issue. Is there any way in which this is avoided? It's really annoying to have to reconnect every half an hour... or opening multiple query notepads, in the end you lose track of what you query on. Any news on this?
I do also vote for this fix!!. My workaround is to click on disconnect and connect again but it is so constant issue that is annoying
I migrated from SSMS to ADS as I like the later for everyday use leaving former only to edit SQL Agent Jobs (that ADS doesn't handle properly), but I miss this "always reconnect by itself" from SSMS
having the same issue, closing and opening a new tab fixes it. Previous tab had completed just fine
yes same error error as well needed to restart Azure Data Studio to fix
Most helpful comment
Seconded. We first get an error re: 'connection closed' and then get this error on re-attempting to run the query. We can never come back to queries after more than 10 minutes or so, we have to close the tab and start a new one in order to establish a connection again.