sql-serverpostgresqldblinkpostgresql-8.3

How can I create a dblink from Postgresql 8.3 to SQL Server (2000 and 2008)?


I have a Postgresql database that need to read data from two SQL Servers (one SQL Server 2000 and one SQL Server 2008).

I want to setup two dblinks to the SQL Servers.

After googling, foruming, reading documentation, I struggle to find something production ready.

What tool can I use ?


Solution

  • You'll want to install pl/perlu and dbilink which lets you use any of Perl's drivers. This would be straightforward enough on a unix-based system, but is probably somewhere around the difficult/impractical/painful end of things on Windows.

    Or, upgrade and try one of the foreign-data-wrappers in recent releases of PostgreSQL. Upgrading is probably worthwhile anyway, since 8.3 is near end-of-life and the 9 series should have some major improvements (particularly if PG is on Windows).

    Or, push the data from the SQL Server end - you can make PostgreSQL available over ODBC.