0

It's been three days that I've been looking for a solution for this scenario I'm in: I need to access to a SQL Server 2000 hosted in a Windows Server 2000, from a PostgreSQL 9 x hosted on Debian 7. This is because me and my team will mount a web server and we need to extract some info from the database (the one in SQL Server 2000).

And no matter how many pages I have visited, I can't find a solution, it seems that there isn't much documentation about the topic. I've read some things like pgadmin, foreign data wrappers, dbi.links... But none of the documentation that I have seen exposes a viable solution since there is not a single and straightforward tutorial.

I just want to make a simple select or update query from PostgreSQL to SQL Server 2000. I really need help.

2
  • Can you talk ODBC to your SQL server 2000 install? If so try github.com/ZhengYang/odbc_fdw or github.com/CartoDB/odbc_fdw Commented Sep 1, 2016 at 4:10
  • A few hours ago i made it work with foreing data wrappers. I'm new to all this tools and i think that's why it was so hard for me to understand. Thanks for your response! Commented Sep 2, 2016 at 6:51

1 Answer 1

2

https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/

Get TDS Foreign data wrapper from here http://pgxn.org/dist/tds_fdw/

Also you need to open the ports

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

3 Comments

Actually, right now i'm using that guide and i was able to create the FDW, but i still don't have i connection. But you said something key right there, are you talking about opening the 1433 port on SQLServer?
We had similar issue, and after changing firewall settings, it was resolved. I'm not sure what exactly should be done in your case as all systems are different, but here is the link which shows how other people managed it. mssqltips.com/sqlservertip/3661/… The main idea is that there are multiple levels of security controls. First is on SQL Server side (enabled remote connections, enabled port, enabled protocols), the second is on Postgres server. Hardware may also have own firewall rules.
Thank you Anton. I'm glad to say that a few hours ago i managed to make it work! I'm planning to make a long post explaining the steps in a very comprehensible way, in case someone finds himself struggling in a similar scenario.

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.