1

I use Mac and PostgreSQL is the choice for db management. I can not install MSSQL. There's a db which is created and managed by MSSQL. I must not copy the entire data via a script, to my database (because of using real time data) My only option is, connecting that MSSQL created db with PostgreSQL.

Is it possible? If yes, how? Will there be any relevant limitations for my queries? Thanks.

Additional details:

I'll make selections, calculations, statistically. I won't modify the existing data.

4
  • Why not simply use your preferred SQL mangement tool remotely. They can all be configured to connect to a remote server as long as the server accepts external connections. Commented Apr 10, 2014 at 7:31
  • Sidenote: "connecting" two different SQL servers is not really an option -- they all have differences in syntax, features, etc. which don't translate well so there is no "connect PostgreSQL to MSSQL" feature (there may be some bridging software available). Commented Apr 10, 2014 at 7:34
  • I tried using remote management. I don't know why it's not working. Commented Apr 10, 2014 at 9:28
  • As I said remote management only works if the destination server accepts external connections. Commented Apr 10, 2014 at 9:30

1 Answer 1

2

The feature, which allows you to connect to a different database from within PostgreSQL itself, is called foreign data wrapper.

Here, there is a list of available foreign data wrappers, but mssql is not included. But ODBC is, so (in theory) if you install odbc_fdw, you can access foreign mssql tables in your PostgreSQL instance.

There is also a tds_fdw for SQL Server which uses FreeTDS for the connection rather than ODBC

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks! At the installation of PostgreSQL, Addon-installation-thing (Cannot remember the name exactly, Stacky-Mtacky thing) shows some additional drivers for it. Will I need them? Your list's elements have almost the same name with them. Thank you for information.
Maybe, but i'm not sure. There is an article here (below), how to install it under windows. postgresonline.com/journal/archives/…
Also note, that odbc_fdw is just a beta, and it seems abandoned. But there aren't any other options (yet).

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.