I have a SQL Server 2005 instance and also a PostgreSQL 9.3 running on the same network, I would like to know if its possible to somehow create or have 'views' on a database within the PostgreSQL server that show data coming from SQL Server.
1 Answer
Use:
A foreign data wrapper like
odbc_fdw
ortds_fdw
(see foreign data wrappers list, foreign data wrapper documentation); ordbi-link
- see github repo
-
Have you successfully manage to get data from MSSQL into a pg db?. I installed
tds_fdw
but documentation its only useful until you install then there's nothing to guide you through how are you supposed to get the tables from MSSQL... (?)– NelsonCommented Mar 29, 2015 at 17:53 -
1@ZQL Once installed, you're supposed to follow the generic PostgreSQL documentation for foreign data wrappers I think.
CREATE FOREIGN DATA WRAPPER
,CREATE SERVER
,CREATE USER MAPPING
(if necessary),CREATE FOREIGN TABLE
. See postgresql.org/docs/current/static/… and the see-also links there. Commented Mar 29, 2015 at 23:59