Foreign Catalog error connecting to SQL Server 2008 R2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 01:15 AM
Hi,
Is there a limitation or know issue when creating a foreign catalog to a SQL Server 2008 R2?
We are successfully able to connect to this SQL Server through a JDBC connection string. To make this work, we have to switch the Java encrypt flag to false as follow:
url = f"jdbc:sqlserver://{database_host}:{database_port};database={database_name};encrypt=false;trustServerCertificate=true;"
This works and allows reads through our notebook. When we then try to create a federated connection using the same credentials, this also works - but there is no flag for "encrypt" to set. When we then create a foreign catalog linked to this connection, it creates the catalog and appears to be okay. The error occurs when we try to read the SQL Server database from the catalog browser or notebook. The error appears to be some sort of namespace list error.
summary: [FAILED_JDBC.UNCLASSIFIED] Failed JDBC jdbc: on the operation: Failed list namespaces SQLSTATE: HV000, data: {"type":"baseError","stackFrames":["org.apache.spark.sql.AnalysisException: [FAILED_JDBC.UNCLASSIFIED] Failed JDBC jdbc: on the operation: Failed list namespaces SQLSTATE: HV000\n\tat org.apache.spark.sql.jdbc.JdbcDialect.classifyException(JdbcDialects.scala:798)\n\tat org.apache.spark.sql.jdbc.JdbcDialect.classifyException(JdbcDialects.scala:782)\n\tat org.apache.spark.sql.jdbc.MsSqlServerDialect.classifyException(MsSqlServerDialect.scala:348)\n\tat
I'm not sure if this error is linked to the encrypt flag that we cannot set at the federated Connection level? I can't see any other options or levers we can change.
Any help appreciated!
Nick
0 REPLIES 0

