我可以在Oracle中链接数据库链接吗? [英] Can I chain database links in Oracle?
本文介绍了我可以在Oracle中链接数据库链接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个数据库. 1链接到2,2链接到3.我想从1查询3中的表.我尝试了third_db_tab @ 3 @ 2,但它不起作用.想知道这是否可能,如果可能,语法是什么.
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.
推荐答案
我认为您可以通过创建同义词来做到这一点.在数据库2中创建一个同义词:
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;
然后在数据库1中创建第二个同义词:
then in database 1 create a second synonym:
CREATE SYNONYM third_db_tab for third_db_tab@2;
这未经测试(我现在没有运行三个数据库),但是我认为Oracle足够聪明,可以解开同义词.
This is untested (I don't have three databases running right now), but I think Oracle is smart enough to untangle the synonyms.
这篇关于我可以在Oracle中链接数据库链接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文