Azure SQL Server error message - Query failed: The file exists

Dan Falcone 30 Reputation points

I have a SQL database resource in Azure that I've been using for a few months. Using Azure Data Studio I can log in to my Azure SQL Server database with my user ID using Authentication Type "Azure AD - Universal with MFA Support", see all of the tables, views, etc. However when I attempt to perform a select query I get the following message:

Started executing query at Line 17

(1 row affected)

Query failed: The file exists.

Total execution time: 00:00:17.418

The query did find the correct amount of rows, however it shows the error "Query failed: the file exists" and does not show the results of the query.

There is also another user id that is querying the same database successfully using Azure Data Factory. Is there a problem with my user ID?

Thanks for your help!

Azure SQL Database
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
552 questions
Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
58 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amira Bedhiafi 4,081 Reputation points

    The error you are getting is more common with filesystem operations. To confirm if the issue is specific to Azure Data Studio, you can try to execute the query using a different tool such as SQL Server Management Studio (SSMS). This way, you can ascertain if the issue is with Azure Data Studio or the Azure SQL Database.

    Azure Data Studio might be logging more detailed error information. Check the logs or the output pane for any additional details regarding the error.

    Ensure that your Azure Data Studio is up to date. An outdated version might have bugs that have been resolved in later versions.

    Although you can see the tables and views, make sure your user has the correct permissions to perform the SELECT query on the specific table you are querying. Though it's not typical for a permissions issue to result in a "file exists" error, it's worth checking.

    As you mentioned another user is querying the database successfully, try using that user's credentials in Azure Data Studio to check if the problem is specific to your user ID.

    If Azure Data Studio is trying to write a temporary file somewhere (like for caching purposes) and encountering this error, you might want to inspect any associated storage accounts or configurations in Azure related to your SQL Database setup.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful