pgspider / jdbc_fdw

JDBC Foreign Data Wrapper for PostgreSQL
Other
58 stars 20 forks source link

Problem importing foreign MSSQL schema #22

Open grouchobear opened 1 year ago

grouchobear commented 1 year ago

We're attempting to connect to an MSSQL server and are receiving an error when importing the dbo schema. The error is: ERROR: remote server returned an error

SQL state: XX000

Not sure what this indicates and any insights are appreciated.

Steps used creating the FDW: CREATE EXTENSION IF NOT EXISTS jdbc_fdw SCHEMA public VERSION "1.2";

/ mssql-jdbc-12.2.0.jre11.jar is located in /usr/bin / CREATE SERVER lyons_mssql FOREIGN DATA WRAPPER jdbc_fdw OPTIONS( drivername 'com.microsoft.sqlserver.jdbc.SQLServerDriver', url 'jdbc:sqlserver://;serverName=sqlcluster;databaseName=lmdw', querytimeout '30', jarfile '/usr/bin/mssql-jdbc-12.2.0.jre11.jar', maxheapsize '600' );

CREATE USER MAPPING FOR CURRENT_USER SERVER lyons_mssql OPTIONS(username 'readeruser',password '*****');

CREATE SCHEMA IF NOT EXISTS lyons_mssql_dbo AUTHORIZATION postgres;

IMPORT FOREIGN SCHEMA dbo LIMIT TO (BATCH) FROM SERVER lyons_mssql INTO lyons_mssql_dbo;

Kenchir commented 1 year ago

I am not sure. But its said on docs, import schema works only on GridDB. You can use this PR which fixes debug mode display on logs for more understanding of the error you are facing.

JulmeTran commented 5 months ago

Currently, we do not support JDBC FDW with SQL Server. We have not tested on SQL Server and only support import foreign schema on GridDB. Therefore, we can not provide any information about this problem.

m0rt commented 1 month ago

Hello.

I currently have the same problem when connecting to SyBase ASE, is it possible to activate debug ?