This content has been marked as final. Show 5 replies
What about the following:
I would think you would want to keep you service name the same so configure a service with the same name.
Perhaps configure DNS so you are always pointing to the "live host".
So in the event of a DR you would create an alias in DNS to go to your standby host. This would mean one change in DNS rather than potentially multiple changes in client side tnsnames.
So nothing on your client side tnsnames would change.
I don't think you can configure what you want so the client will always go to the primary database without changing anything.
PS: If you're using 11gR2 then why not use SCAN? Similar principle in the event of a DR your DNS for your clients would point the SCAN to your standby hosts.
I was also looking at SCAN, and it seems a bit complicated to set up.
FCF (fast connection failover) also seems to be an option similar to TAF.
Unfortunately, our production environment is already set up using the same database name on both primary and standby server, (with the differences on the service names similar to my example above).
This shouldn't really matter and I can do a manual switchover back and forth using this method in my test environment.
My challenge is how to set up the clients so they will automatically switch to active primary database (on a different server) when the database switches over.
Loss of connection by the client is acceptable, as long as they can reconnect and when they reconnect they will reconnect to the new primary automatically.
Most of my clients (but not all) will use an application on one of four application servers. The application servers have Oracle client on them which connects to the database.
For the few clients that are not using the application, they would be using some kind of report tool like Crystal Reports, which I believe also reads the tnsnames file (either that or uses ODBC which reads the tnsnames file).
ji li wrote:Hi,
We are running Oracle 11GR2 on Solaris 10.
I have a physical standby database configured, but not yet configured for FSFO.
I will be setting the DGBroker to faststart failover but also need to understand how to configure clients to automatically resolve the SID to the failed over database.
So in our case, we have a database with the same name on both primary and standby servers, and only the service is different.
For discussion purposes, let's call the database DGTEST and the services as DGTEST_DG1 and DGTEST_DG2, where DG1 is primary and DG2 is standby).
So, how do I configure the tnsnames for the clients to automatically resolve to the correct SID that is active (as primary)?
My first thought was something like this:
DGTEST = ( DESCRIPTION= (FAILOVER=ON) (ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=myhost1)) (ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=myhost2)) (CONNECT_DATA=(SERVICE_NAME = DGTEST_DG2)) <=========== not sure about this part )
You must add a new service runing when database role is PRIMARY and a trigger for when start new service when database role changed to PRIMARY.
Please check : http://www.mahir-quluzade.com/2012/05/oracle-data-guard-11g-overview-client.html
Mahir M. Quluzade
That's really useful Mahir.
Unfortunately, there is no sound on your video, and perhaps because of your broken English, but overall, I get the idea and it is very useful.
Thank you very much for sharing.
You are welcome!