Reputation: 1424
In MSSQL exists the linked server
concept, where you connect an external DB and link some tables of it in your current DB engine.
For my application I want to do the opposite, have an interface to MSSQL from Postgres or MySQL. Is there an equivalent to linked servers?
Upvotes: 0
Views: 3596
Reputation: 192
I have successfully created a linked server from MSSQL to Mysql and to Postgres. this article claims to support foreign data wrappers for SQL server. https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration-part-3/
They will allow you to create foreign tables on your postgres db. I would create a separate schema and put the foreign tables there. Unlike linked servers, you have to specify each table that you wish to assign as a foreign table. This is much like MYSQL Federated Tables or AZURE SQL Elastic tables. The good old days of SQL SERVER linked servers are going away..
Upvotes: 0
Reputation: 108851
MariaDB, the MySQL fork maintained by the original MySQL team, offers the CONNECT storage engine with a JDBC connection type.
It's not trivial to rig up. It probably won't be available on shared servers at hosting companies. It does access to data on multiple table server makes and models.
Upvotes: 0
Reputation: 19663
In PostgreSQL you might wanna look into Foreign Data Wrappers, e.g. mysql-fdw
, oracle_fdw
(developed by a fellow SO user). For MSSQL check also the link posted by @a_horse_with_no_name in the comments.
Upvotes: 0