Thread: Connecting to SQL Server from Windows using FDW
Hi,
I need to create a linked server between 2 Windows servers. In one I've PostgreSQL with admin privileges and in the other MS SQL with only read access.
I need to create a view (or a foreign table?) in PostgreSQL from a table in MS SQL in another server. The table in the MS SQL is constantly growing and I need on-the-fly access to the data.
After some web search I found GeoffMontee's Github, but I don't know how to install it on Windows...
Is there anyone how already did something like this and could help me out..?
On 01/22/2016 10:05 AM, ivo silvestre wrote: > Hi, > > I need to create a linked server between 2 Windows servers. In one I've > PostgreSQL with admin privileges and in the other MS SQL with only read > access. > > I need to create a view (or a foreign table?) in PostgreSQL from a table > in MS SQL in another server. The table in the MS SQL is constantly > growing and I need on-the-fly access to the data. > > After some web search I found GeoffMontee's Github, but I don't know how > to install it on Windows... > > Is there anyone how already did something like this and could help me out..? Seems like it is an open issue: https://github.com/GeoffMontee/tds_fdw/issues/53 > > Thanks in advance! > > Kind regards, > > -- > Ivo Silvestre > ______________________ > *técnico sig | gis technician* > > <https://www.linkedin.com/in/ivomts> > ______________________ -- Adrian Klaver adrian.klaver@aklaver.com
On Jan 22, 2016, at 1:05 PM, ivo silvestre <ivomts@gmail.com> wrote: > I need to create a linked server between 2 Windows servers. In one I've PostgreSQL with admin privileges and in the otherMS SQL with only read access. > > I need to create a view (or a foreign table?) in PostgreSQL from a table in MS SQL in another server ... > ... I found GeoffMontee's Github, but I don't know how to install it on Windows... Perhaps this link may help: https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/ The only caveat I see offhand is the use of the 'sa' account, but I can't vouch for that being a required mapping. Cheers, John
Hi John,
Thanks, but I already saw that link. The problem is to installing the tds_fwd extension on postgres. And I don't know how to (never tried) compile it...
What comes with postgres by default is the postgres fdw, that allow to link 2 different postgres servers, but in this case that doesn't help me.Thanks, but I already saw that link. The problem is to installing the tds_fwd extension on postgres. And I don't know how to (never tried) compile it...
On 23 January 2016 at 04:40, John J. Turner <fenwayriffs@gmail.com> wrote:
On Jan 22, 2016, at 1:05 PM, ivo silvestre <ivomts@gmail.com> wrote:
> I need to create a linked server between 2 Windows servers. In one I've PostgreSQL with admin privileges and in the other MS SQL with only read access.
>
> I need to create a view (or a foreign table?) in PostgreSQL from a table in MS SQL in another server ...
> ... I found GeoffMontee's Github, but I don't know how to install it on Windows...
Perhaps this link may help:
https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/
The only caveat I see offhand is the use of the 'sa' account, but I can't vouch for that being a required mapping.
Cheers,
John
--
On 23 January 2016 at 04:40, John J. Turner <fenwayriffs@gmail.com> wrote:On Jan 22, 2016, at 1:05 PM, ivo silvestre <ivomts@gmail.com> wrote:
> I need to create a linked server between 2 Windows servers. In one I've PostgreSQL with admin privileges and in the other MS SQL with only read access.
>
> I need to create a view (or a foreign table?) in PostgreSQL from a table in MS SQL in another server ...
> ... I found GeoffMontee's Github, but I don't know how to install it on Windows...
Perhaps this link may help:
https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/
The only caveat I see offhand is the use of the 'sa' account, but I can't vouch for that being a required mapping.
On Jan 23, 2016, at 4:08 AM, ivo silvestre <ivomts@gmail.com> wrote:
Hi John,What comes with postgres by default is the postgres fdw, that allow to link 2 different postgres servers, but in this case that doesn't help me.
Thanks, but I already saw that link. The problem is to installing the tds_fwd extension on postgres. And I don't know how to (never tried) compile it...
Sorry Ivo, my bad - I managed to gloss over the salient point for your issue in this link - you're on Windows, his Postgres was on Linux!
Compiling an extension on Windows, last time I tried many moons ago was unfortunately not successful, which involved compiling the whole pg source tree via MinGW.
Hazarding a thought - although it's discontinued, it might be worth checking out Windows Subsystem for UNIX-based Applications (SUA):
But I suspect anything you managed to compile with that would still be incompatible with your pg instance...
Beyond that, perhaps the gurus here have some sage advice...
- John