Re: DataGuard Failover and Thin Clients

  • From: Martin Bach <development@xxxxxxxxxxxxxxxxx>
  • To: ian@xxxxxxxxxxxxxxxxx
  • Date: Fri, 15 Jan 2010 11:09:32 +0000

Hi Ian

I have seen users implement a generic name for the database servers in DNS which point to the live nodes during normal operations. In case of a failover (or switchover), you'd change the generic DNS entry to point to the DR box. No change needed at the clients (unless the cache DNS entries). It requires you to chose a reasonably short ttl for your DNS server though. Hmm, sounds convoluted, so here's an example, all IP addresses and names completely arbitrary:

Assume the primary database has the following setup (3 node RAC):

node1 vip - 10.43.9.10
node2 vip - 10.43.9.11
node3 vip - 10.43.9.12

This could be the setup for the DR database (also 3 node RAC)

drnode1 vip - 10.32.8.10
drnode2 vip - 10.32.8.11
drnode3 vip - 10.32.8.12

Then the network team could define a common name for the database in DNS:

prod{1,2,3} which normally point to 10.43.9.{10,11,12}

The tnsnames.ora rolled out to database clients only ever use prod1, prod2 and prod3 in the ADDRESS_LIST section, never the "real" server names. In case when DR is activated, the network ops team changes the IP addresses of prod{1,2,3} to point to the DR servers. On Linux, you might have to flush the name service cache but that worked well for me.

Then again tnsManager could do something similar for you.

Hope this helps (and is understandable),

Martin

On 01/14/2010 06:11 PM, MacGregor, Ian A. wrote:
For thick clients the tnsnames.ora file includes two or more hosts for a given 
service_name,  I believe clients treat this as an ordered list and try each one 
until a connection is established.   Thin clients  do not use tnsnames.  One 
suggestion is to use LDAP.but I'm not sure how universal that is nor exactly 
how to set it up.

Another thought is to have the machines switch names and ip addresses right 
after a switchover.  These machines have four NIC's each.  Oracle would be a 
service on one of them.   This type of thing is often done via clusterware.  
Can Oracle's clusterware do this?  This is not a RAC environment, but a 
physical standby one.

I realize there are going to be consequences of doing this, any which are 
unsurmountable.   I'm not in favor of this.  It seems over-engineered,  but 
that may be due to ignorance.


Ian MacGregor
SLAC National Accelerator Laboratory
ian@xxxxxxxxxxxxxxxxxxx
//www.freelists.org/webpage/oracle-l



--
Martin Bach
OCM 10g
http://martincarstenbach.wordpress.com
--
//www.freelists.org/webpage/oracle-l


Other related posts: