how to dynamically switch accessing a table from one db to another [message #228102] |
Sat, 31 March 2007 12:32 |
gkodakalla
Messages: 49 Registered: March 2005
|
Member |
|
|
Hi,
we have two databases in our production system.
these two databases gets loaded from the data from mainframes data everyday.
Sometimes, data loading fails on one database and we switch traffic to other database even if one table loading fails.
I would like to know if there is any way to address this:
In DB1 if one tables loading is failed, I want to configure in such a way that any sql statement hitting DB1 should be automatically routed to DB2. Other statements querying other tables should come to DB1 itself.
Is this approach possible:
1) DB1 table loading failed and DB2 table loading is successful
2) From DB2 we will grant access on the Table T to DB1 and create a public synonym so that DB1 can access without the link.
3) Revoke the select privileges on the DB1 table to the user in DB1 so that select on T table wont select from local table, instead goes to the DB2 table.
Please advice.
Thanks
Giridhar
|
|
|
|