0

I have a MS SQL (SQL Server 2008) database with some data in it and a postgresql (9) database with other data. I need to do some queries to find related data. I know how to link two MS SQL databases together but not sure how to even start with the mixed database types.

The new company I work for has postgresql, I have not worked with it before. The guy I replaced was really the only one here who knew much about it. So no internal resources.

I'm not ready to build a solution in code at this point (.NET), just hoping to have a tool to do some queries.

Postgresql has table Company Company_id, Company_name, ....

MS SQL had table Companies company_name, postgresql_company_id, company_id, ....

1 Answer 1

2

If you ever need to run queries from Postgres that pulls data from SQL-Server, you can use foreign data wrappers. The ODBC driver should work fine:

http://wiki.postgresql.org/wiki/Foreign_data_wrappers

I'm not familiar enough with SQL-Server to give an authoritative answer on how to do it the other way around, but since Postgres speaks ODBC, I'm guessing it's close enough to how you make a SQL-Server talk with another one.

Related thread: SQL Server 2012: Add a linked server to PostgreSQL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.