Re: Select on Foreign table is not working

From: Samed YILDIRIM <samed(at)reddoc(dot)net>
To: Sahil Khan <ksahil0258(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Select on Foreign table is not working
Date: 2023-01-11 20:20:35
Message-ID: CAAo1mbnre-E-3i=fwN=UoLeaHnFNQY_5+jtdGiB8=5ux0qq9bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Sahil,

I think it is related to freetds configuration. I recommend you try to
connect the target MS SQL Server via the tsql client of FreeTDS. You may
need to adjust tds protocol version and character set.

Best regards.
Samed YILDIRIM

On Wed, 11 Jan 2023 at 10:13, Sahil Khan <ksahil0258(at)gmail(dot)com> wrote:

> Hi,
>
> Hope you are doing well,
>
> I have created a foreign table on my postgresql server to select the data
> on external table which is reside on MS SQL Server, everything went well
> from installing to freetds and installing and configuring tds_fdw tool, and
> created foreign server and user mapping then created foreign table, but
> when i do select from table_name then it throws an error which is i
> mentioned below as.
>
> ERROR: DB-Library error: DB #: 20018, DB Msg: General SQL Server error:
> Check messages from the SQL Server, OS #: -1, OS Msg: , Level: 16
>
>
> will be highly grateful for your valuable suggestions, where to look for
> to get this done.
>
> Thank You.
>
>
>
>
> Regards,
> Sahil | +919892569610
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Datta D 2023-01-12 03:14:19 Re: MSSQL to PostgreSQL Migration
Previous Message Wells Oliver 2023-01-11 19:55:33 Re: Function list similar to psql's \df+ w/o code?