I have a question about diverting queries (just retriving of data) to standby databsse.
F.ex I have a aplication which process patients data.
Application has one Reports module. I want these reports to point to standby database as there no UPDATE/DELETE/INSERT operation. So If I MOUNT my standby database in READ-ONLY mode, I will able to do this, then this can be achived.
How do I divert ***only*** Reporting Module to Standby database?
Do I have to use to two differnt connections.. one will point to Live DB and other will point to STDB.. Does this mean division of application?
you have to use two different service names(in tnsnames.ora) one connects to live db(primary host) and standby db(stby host). Similar to services you set up in init.ora for automated recovery of standby database thru RFS process.
I was wondering how queries in one application will able to divert to STDB.. That means I have to take care while designing application. So that I need to seperate-out those queries to different module which needs only read only access to DB and will point to STDB service.
Or May be a second though: Pl. Let me know your suggestion.
What If I make a DB link which points to STDB database. In this case I don't have to seperate my application and I don't have to use two different connets then. In this case my application will also remain bind.
If reports module is integrated component of your application, then you are left with no choice of having DBLINK, otherwise configure a dedicated service name for reports module which connects to standby.
dblink is not a bad idea as you were claiming resources on primary and distributing the reports load to standby. Make sure your network bandwidth meets reports module performance.
Originally posted by badrinathn
I am not sure how we can put the standby database in the read only mode. 'cos, you mount the database in 'standby mode', there is no where you will be able to mount it in 'read only ' mode.
Further as the database name is going to be the same it's logical that you cannot access the 'standby database'.
Now the question is can I keep standby db open in read only mode and apply logs on background using managed recovery
It is possible to mount standby database in read-only mode and access it.
While the standby database is in read-only mode, the site can still receive archived redo logs from the primary site. Nevertheless, Oracle does not apply these logs automatically, as in managed recovery.
So my option of keeping it in read-only mode and applying logs on background is now out....
One can achive this but in that case he must have two standby databases.. One will be in managed recovery mode and other will be in read-only mdoe.. He has to synchronize the readonly standby database periodically...