开发者

Dynamic DB links in Oracle

开发者 https://www.devze.com 2023-01-16 00:43 出处:网络
Is it possible to have dynamic database links in Oracle? I am using Oracle9i database. Let me illustrate by what I require.

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 TABLE@MYDBLINK.WORLD

mydbLINK.WORLD NEEDS TO POINT TO DIFFERENT INSTANCES OF THE DATABASE. SO AT ONE POINT IT MUST POINT TO THE DATABASESERVER开发者_StackOverflow1 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?


Try using SYNONYMS as suggested by "Justin Cave" in this post.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号