Oracle 中的动态数据库链接
Oracle 中可以有动态数据库链接吗?我使用的是Oracle9i数据库。
让我用我的要求来说明。 我有几个使用 dblink 形成的视图。 例如:
CREATE VIEW MYVIEW AS SELECT * FROM [email protected]
mydbLINK.WORLD需要指向数据库的不同实例。因此,在某一时刻它必须指向DATABASESERVER1,然后它必须切换到DATABASESERVER2。
目前,我们正在通过删除链接并重新创建它来做到这一点。当我们这样做时,我们必须重新编译所有对象,刷新所有快照。是否可以避免丢弃和重新创建?我知道一旦视图发生变化,我就必须重新编译对象并刷新快照。
有人实现过这个功能吗?
Is it possible to have dynamic database links in Oracle? I am using Oracle9i database.
Let me illustrate by what I require.
I have several views that are formed using dblinks.
For example:
CREATE VIEW MYVIEW AS SELECT * FROM [email protected]
mydbLINK.WORLD NEEDS TO POINT TO DIFFERENT INSTANCES OF THE DATABASE. SO AT ONE POINT IT MUST POINT TO THE DATABASESERVER1 AND THEN IT MUST SWITCH TO DATABASESERVER2.
Currently we are doing this by dropping the link and recreating it. When we do this, we have to recompile all the objects, refresh all the snapshots. Is it possible to avoid the dropping and recreating? I understand as soon as teh view changes, I will have to recompile the objects and refresh the snapshots regardless.
Has anyone implemented this feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试按照“Justin Cave”在此帖子。
Try using SYNONYMS as suggested by "Justin Cave" in this post.