babelfish-for-postgresql / babelfish_extensions

Babelfish for PostgreSQL provides the capability for PostgreSQL to work with applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query and procedural language, so you don’t have to switch database drivers or rewrite all of your application queries.
https://babelfishpg.org/
Apache License 2.0
274 stars 93 forks source link

How to setup babelfish_fwd #2408

Closed madanparedla closed 3 months ago

madanparedla commented 7 months ago

HI Suport can any one help me on how to setup babelfish_fwd in sql server to setup linked server from SQL SERVER to Babelfish

staticlibs commented 7 months ago

Hi, please see this section of Babelfish Linked Servers doc.

madanparedla commented 7 months ago

hello @staticlibs can you please provide any link to setup ODBC drivers for babelfish as i am new to linux environment and babelfish

i am getting below error [01000][unixODBC][Driver Manager]Can't open lib 'psqlodbcw.so' : file not found [ISQL]ERROR: Could not SQLConnect

staticlibs commented 7 months ago

@madanparedla , to connect to Babelfish over ODBC from Linux you need to install Microsoft ODBC Driver 18 for SQL Server and use connection string like this:

DRIVER={ODBC Driver 18 for SQL Server};SERVER=127.0.0.1,1433;UID=jdbc_user;PWD=12345678;TrustServerCertificate=yes

Just I don't think this is needed at all for Linked Servers/FDW setup. I can confirm that Babelfish doc above is correct and linking between SQL Server and Babelfish works in both directions, and either of SQL Server and Babelfish can be on Windows or on Linux (PolyBase is required when SQL Server runs on Linux, but that is not a Babelfish limitation).

If you have more general questions about Babelfish, this bugtracker may be not the best place for that. It may be better to continue it on some medium for talks, like Babelfish Discussions board. For Windows-specific questions you can use public Discord server (or other social links) from my GitHub profile.

suprio-amzn commented 4 months ago

@madanparedla: Did the above suggestion from @staticlibs work for you?