views:

4

answers:

0

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?