Skip to content

Invoking DatabaseMetadata.getIndexInfo() reports "PROCEDURE 'sp_statistics' is not supported" #2835

@susanYYT

Description

@susanYYT

Driver version

13.2.1

SQL Server version

Synapse

Problem description

When connecting to a Synapse serverless sql pool, we need to invoke DatabaseMetadata.getIndexInfo() to get Unique indices

Expected behavior

Get corresponding result set

Actual behavior

com.microsoft.sqlserver.jdbc.SQLServerException: PROCEDURE 'sp_statistics' is not supported.

Error message/stack trace

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: PROCEDURE 'sp_statistics' is not supported.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:278)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1788)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:688)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:607)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7825)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:4828)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:321)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:253)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:521)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getIndexInfoAzureDW(SQLServerDatabaseMetaData.java:1351)
at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getIndexInfo(SQLServerDatabaseMetaData.java:1280)

Any other details that can be helpful

Using mssql jdbc 13.2.0 and earlier drivers work fine.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions