简体   繁体   中英

Remote Link between PostgreSQL and Oracle database

how to create a synonym for a table of a schema in postgresql database on a server into a schema of oracle database on another server?

I have a schema on oracle database on a server and want to create a synonym a table present in a schema of postgresql database on another server.

To create the synonym, we need to have database remote link between these two databases present on two different servers.

How can we do this? Please provide me one solution.

Just to clarify, I believe the question is trying to figure out how to get PostgreSQL data to appear as a table inside of Oracle. (The existing comments seem to be reading it the other way around, in which case, yes, an FDW would be the solution, but in this case that will not work).

In the past (on older versions of Oracle) when we needed this we were forced to build custom replication scripts to transfer data from Postgres into Oracle systems. For a single table, it is pretty straightforward to do with something like Perl & DBI... feel free to substitute that with your favorite scripting language.

On newer Oracle systems, I believe you can use Oracle Database Gateway to accomplish this. I am not sure if they support Postgres directly, but they do support ODBC (and I think JDBC) which should work. Here is an example blog post setting this up with MSSQL ( http://oracle-help.com/oracle-database/installation-oracle-database-gateway/ ), the process should be similar for Postgres.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM