Azure SQL Server getCatalogs
doesn't support USE
statement when not using master database
#15887
Labels
Milestone
Expected behavior
Expected behavior: Calling
Meta.getCatalogs()
on an Azure SQL Server database connection should return all of the catalogs for the databaseActual behavior
Actual behavior: The call fails with
USE statement is not supported to switch between databases. Use a new connection to connect to a different database.
The SQL Server JDBC driver does not support returning the entire set of catalogs for an Azure DB. As is, this would never work unless you're connecting to the master databasehttps://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-to-an-azure-sql-database?view=sql-server-ver16#details
Steps to reproduce the problem
DSLContext.dsl().meta().getCatalogs()
or any of the other getters exposed inMeta
jOOQ Version
JOOQ Enterprise 3.18.6
Database product and version
Azure SQL Server
Java Version
openjdk version "20.0.2" 2023-07-18
OS Version
Mac OS Ventura 13.0
JDBC driver name and version (include name if unofficial driver)
com.microsoft.sqlserver:mssql-jdbc:12.2.0.jre11-preview
The text was updated successfully, but these errors were encountered: