On Tue, 5 Jul 2011 19:38:25 -0400
"Jonathan Brinkman" <JB@BlackSkyTech.com> wrote:
> I was really hoping to keep the data-replication (between MSSQL
> --> PG) contained within a PG function.
>
> Instead I could write a small shell script or C service to do this
> using tsql (freetds). I have access to the MSSQL data via unixodbc
> and tdsodbc/freetds in my Ubuntu console.
I wrote some scripts, mainly in php and perl that make use of
freetds/odbc to migrate a schema from MSSQL to pg and import the data
via csv.
Postgresql can run perl, python and php "internally" and all those
languages have odbc drivers so you could skip the csv passage.
It's not elegant as it would be accessing the data directly from
odbc in pg but it works.
I can share some code.
> But I want to read from that ODBC stream directly in Postgresql,
> like a SELECT on Linked Servers in MSSQL-world or on a linked
> table in MSACCESS. That would give control over the ODBC
> interaction to the PG function rather than a non-DB entity.
> Has anyone tried ODBC-Link
> (http://www.cybertec.at/en/postgresql_products/odbc-link)? I
> couldn't get through the install due to Ubuntu-related error.
Nice. I'd be interested in some feedback if you succede to make it
work.
Does this project has any chance to be included in contrib? It seems
alive and kicking.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it