pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSelect on Foreign table is not working
3+ messages / 3 participants
[nested] [flat]
* Select on Foreign table is not working
@ 2023-01-11 08:12 Sahil Khan <ksahil0258@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Sahil Khan @ 2023-01-11 08:12 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Select on Foreign table is not working
@ 2023-01-11 08:37 Holger Jakobs <holger@jakobs.com>
parent: Sahil Khan <ksahil0258@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Holger Jakobs @ 2023-01-11 08:37 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Am 11.01.23 um 09:12 schrieb Sahil Khan:
> 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
I would suggest to do as the message says:
*Check messages from the SQL Server*
So, the log on the foreign server should have more information, which
isn't forwarded to PostgreSQL:
Kind Regards,
Holger
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Attachments:
[application/pgp-signature] OpenPGP_signature (202B, ../../82da1091-ef02-ed31-06ea-158eaaaf1ed2@jakobs.com/3-OpenPGP_signature)
download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Select on Foreign table is not working
@ 2023-01-11 20:20 Samed YILDIRIM <samed@reddoc.net>
parent: Sahil Khan <ksahil0258@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Samed YILDIRIM @ 2023-01-11 20:20 UTC (permalink / raw)
To: Sahil Khan <ksahil0258@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
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@gmail.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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-01-11 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 08:12 Select on Foreign table is not working Sahil Khan <ksahil0258@gmail.com>
2023-01-11 08:37 ` Holger Jakobs <holger@jakobs.com>
2023-01-11 20:20 ` Samed YILDIRIM <samed@reddoc.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox