View all schemas in Azure SQL connection Follow
I'd like to be able to switch between database schemas in an Azure SQL connection. However, when I try to pull the list of schemas I get this error:
[S0001] com.microsoft.sqlserver.jdbc.SQLServerException: Reference to database and/or server name in <schema name> is not supported in this version of SQL Server.
Is there a way for me to do this in DataGrip or do I need to create a separate connection for each database I want to use?
Please sign in to leave a comment.
@ Andrew Clarke
Do you want switch between databases or schemas?
Your error says that you're trying to make queries between databases/servers. But:
Cross database queries aren't supported in SQL Azure. Which means you need to either combine the databases to prevent the need in the first place, or query both databases independently and basically join the data in your application.
There are some discussions concerning your topic:
Sorry, I mean switch between databases. I have a bunch of databases on one Azure SQL Server, and I want to be able to run a query against one of them, then use a different database and run the query, etc. Right now I have to create a new connection for each database, vs. being able to browse/switch between databases in the same connection. When I try to refresh the database list for an Azure SQL Server in DataGrip, I get the error I listed above.
@ Andrew Clarke
To execute a query against a database you need to switch context for console
For further error investigation could you email email@example.com me your IDE & SQL logs?
I am finding the same issue. A vanilla azure database without AD authentication results with this error.
[S0001] com.microsoft.sqlserver.jdbc.SQLServerException: Reference to database and/or server name in '<schema>' is not supported in this version of SQL Server.
Attempted both the Azure SQL Database and Microsoft SQL Server driver.
No issue when using Microsoft SQL Server Management Studio.
Follow the issue in DataGrip bugtracker https://youtrack.jetbrains.com/issue/DBE-8115