Can I chain database links in Oracle?

折月煮酒 提交于 2019-12-06 02:14:00

问题


I have 3 databases. 1 links to 2, 2 links to 3. I'd like to query tables in 3, from 1. I tried third_db_tab@3@2 and it did not work. Wondering if this is possible and if so, what the syntax is.


回答1:


I think you can do this by creating synonyms. In database 2 create a synonym:

CREATE SYNONYM third_db_tab for third_db_tab@3;

then in database 1 create a second synonym:

CREATE SYNONYM third_db_tab for third_db_tab@2;

This is untested (I don't have three databases running right now), but I think Oracle is smart enough to untangle the synonyms.



来源:https://stackoverflow.com/questions/2989926/can-i-chain-database-links-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!