Thread: Read tables of sql server with postgres
I'm trying to access sql server tables through postgres, I tried using this wrapper for databases with this ODBC driver <http://www.postgresonline.com/journal/archives/249-ODBC-Foreign-Data-wrapper-to-query-SQL-Server-on-Window---Part-2.html> , but the lastest version is compatible only with the 9.1 version of Postgresql I need a odbc driver for Postgresql 9.3 This is my sql shell (psql) when I try to do a CREATE EXTENSION statement postgres=# CREATE EXTENSION odbc_fdw; ERROR: biblioteca «C:/Archivos de programa/PostgreSQL/9.3/lib/odbc_fdw.dll» inc ompatible: versión no coincide DETALLE: Servidor tiene versión 9.3, biblioteca es versión 9.1. postgres=# The error says "library «C:/Archivos de programa/PostgreSQL/9.3/lib/odbc_fdw.dll» inc ompatible: version doesn't match DETAIL: the server version is 9.3 and the lib version is 9.1" Then I realized I can't use or compile the 9.1 version because of this <http://www.postgresql.org/message-id/28812.1337278335@sss.pgh.pa.us> So I found this version by another author, the code is adapted to postgres 9.2+ versions. I compiled in 9.2.6 and 9.3.2 versions and I get this error in both versions when I try to make a select into a foreign table: ERROR: odbc_fdw::odbcGetTableSize: Could not retrieve table size Is there another path to follow? the problem is not odbc, I just need to read sql server tables (but I didn't found a sqlserver connector though) My second option is access sqlserver tables across linked server in sqlserver, but I want to discard all the options from the postgres side pd: If there's any grammar mistakes, sorry -- View this message in context: http://postgresql.1045698.n5.nabble.com/Read-tables-of-sql-server-with-postgres-tp5793046.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
So, there's no way to do this? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Read-tables-of-sql-server-with-postgres-tp5793046p5794581.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On Tue, Mar 4, 2014 at 6:48 AM, loref85 <loref85@yahoo.com.ar> wrote: > So, there's no way to do this? You might want to give jdbc-fdw a try. not sure what's wrong with odbc -- looks like a driver mismatch issue. merlin
On 03/04/2014 04:48 AM, loref85 wrote: > So, there's no way to do this? > In your original post you said you found a version of odbc_fdw that compiled for 9.2+, but hung on a select due to this error: ERROR: odbc_fdw::odbcGetTableSize: Could not retrieve table size Have you tried to contact the author of the odbc_fdw extension and see what they have to say? -- Adrian Klaver adrian.klaver@aklaver.com