Hi, few days ago we planned a switchover in a dataguard 10g configuration (pasive dataguard) between 2 servers.
primary: APP in europe.com
secondary: APP1 in asia.com
Both databases was Oracle 10.2.0.3 in Redhat (single instance)
Everything goes ok with the databases and the switchover but what happend with the web based applications ?
I have a lot of PHP web applicattion that have a connection string with oci and oracle client, all of them have the connection like user/pass@dbname where dbname is defined in the local tnsnames.ora with the DNS names to the host.
(All of them have xxx/xxx@APP) , and APP was ( host:europe.com and SID=APP)
europe.com was ip 22.214.171.124
asia.com was ip 126.96.36.199
My primary instance was APP (sid name) and the standby was APP1 (sid name) but what happend when I switchover the dataguard ?
yes, as we have a lot of applications and we don´t change the string connection , all of them will try to connect to the new physical standby database APP who is in europe.com. (and the new primary is APP1 in asia.com)
Well, first of all I must change the SID in the standby database (identical to the primary database ) for the string connection so for that I : (so development are dont want to change the string connection...)
1) shutdown immediate the standby database
2) remove the dataguard broker configuration,
3) change the instance name in the spfile from APP1 to APP.
4) change db name in the spfile from APP1 to APP.
5) change the fal_client parameter from (INSTANCE_NAME=APP1) to (INSTANCE_NAME=APP)
6) change the orapwd file to APP from APP1
7) change the bash_profile configuration to APP and re start the standby database.
8) Check the listener.ora, so the new listen service is APP and no APP1
8) re config the dataguard broker configuration
Ok, everything works fine and we have the primary and the standby database with the same SID name.
But what happend with the dns servers ? because the web based applications will try to connect to APP but APP was defined as europe.com and I want to redirect to asia.com as primary database.
Well , first of all I change all of my parameters file and dataguard broker configuration to IP and no dns, then I made a procedure guide for switchover so when we made that, first we must switchover the databases and then the NET area must change the dns server so new dns europe.com point to ip 188.8.131.52
After that everything works fine !!!
So in conclusion, before a switchover with dataguard ( who was an excellent feature) check the string connection of the applications and take care of them) and if it is necesary, use the same SID for both (primary and standby databases )
( In Oracle 12c we have a lot of thing to use like application continuity for that )