Skip to content

Problem importing foreign MSSQL schema #22

Description

@grouchobear

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions