Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Data Guard

RE: Data Guard

From: <oracle-l-bounce_at_freelists.org>
Date: Fri, 7 Apr 2006 13:07:45 -0400
Message-ID: <C0A5E31718FC064A91E9FD7BE2F081B13E3778@exchange.gridapp.com>

I have no idea if this will work, but many naïve DNS caching systems cache only the first label - that is, if foo.bar has ip 1.2.3.4, it'll cache the mapping from foo.bar->1.2.3.4 . If, however, foo.bar is a CNAME to bar.baz, and bar.baz has the IP 1.2.3.4, it might only cache the foo.bar->bar.baz, not the IP itself. This allows you to change the IP of bar.baz without worrying about the cache expiry.

Never having worked with either of these programs, I can't say if they'll work, but I've used this trick before on a very large scale.

Thanks,
Matt

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of JayMiller_at_TDWaterhouse.com Sent: Friday, April 07, 2006 11:48 AM
To: oracle-l_at_freelists.org
Subject: RE: Data Guard

Just an added note if you go the DNS route (which is what we do).

If you use Websphere or Microsoft Transaction Server (or probably most others) as a middle-tier connection manager then it will be necessary to recycle the services after the DNS Name is switched since they "thoughtfully" cache the ip address for you. I remember the first time we did a primary/standby switch after implementing the middle tier connection pooling many years ago. I still wake up screaming some nights :)

Oh, if anyone knows a workaround for that I'd love to hear it. Basically all we ever got out of Oracle or IBM was "just recycle the services to clear out the cached ip address". It was supposed to be so easy to just switch the DNS name...

Jay Miller  

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]
Sent: Friday, April 07, 2006 8:45 AM
To: willyschriemer_at_gmail.com
Cc: oracle-l_at_freelists.org
Subject: Re: Data Guard

On 04/07/2006 08:16:22 AM, willy wrote:
> Hi Database Gurus,
>
> I've a question regarding Data Guard. If a database switches role from
> standby to primary can I still connect to the new primary database
without
> setting a network alias or adjusting the tnsnames.ora with the new IP
adress
> ? I guess it has something to do with the tnsnames.ora but I can't
figure
> out how to do this.
>
> TIA,
>
> Willy Schriemer
>

Willy, there are several tricks you can do: 1) Do it on the DNS name server and when the roles are switched, change the machine alias. That is

   the simplest way that requires a little cooperation from SA people. 2) Replace the tnsnames.ora files. That requires either replacing it in the central location

   or re-distributing the new version.
3) You can do it in tnsnames.ora like this:   (FAILOVER=on)
  (ADDRESS=

       (PROTOCOL=tcp)  
       (HOST=server1)  
       (PORT=1521)) 
  (ADDRESS=
       (PROTOCOL=tcp)  
       (HOST=server2)  
       (PORT=1521)) 
  (CONNECT_DATA=
     (SERVICE_NAME=screwup) 


Oracle*Net will first try connection to server1 and, if it isn't available, will
try server2. Trick with DG is that both services (listeners) will respond, but one
database will be in the recovery mode, unavailable for SQL processing. I haven't tried
that. You can also add "LOAD_BALANCE=ON" and that will make Oracle*Net select address at
random. Without that, it will try first address, then the 2nd one and so forth. You can
also have two database with the same service name and then do this:

SCREWUP_BIG =
DESCRIPTION =
  ((ADDRESS=

       (PROTOCOL=tcp)  
       (HOST=server1)  
       (PORT=1521)) 
  (CONNECT_DATA=
     (SERVICE_NAME=screwup) 
     (INSTANCE_ROLE=primary)
     (FAILOVER_MODE=
       (BACKUP=screwup_small) 
       (TYPE=select) ))

)

SCREWUP_SMALL =
DESCRIPTION =
  ((ADDRESS=

       (PROTOCOL=tcp)  
       (HOST=server2)  
       (PORT=1521)) 
  (CONNECT_DATA=
     (SERVICE_NAME=screwup) 
     (INSTANCE_ROLE=secondary))

)

That will make user connect to the secondary site, in case that the primary isn't available.
Service names are my own. You would be well advised to change them.

-- 
Mladen Gogala
http://www.mgogala.com

--
http://www.freelists.org/webpage/oracle-l



-----------------------------------------
This message is confidential and sent by TD Waterhouse solely for
use by the intended recipient.  If you are not the intended
recipient, you are hereby notified that any use, distribution or
copying of this communication is strictly prohibited.  This should
not be deemed as an offer or solicitation, to buy or sell any
product. Any 3rd party information contained herein was prepared by
sources deemed reliable, but is not guaranteed.  TD Waterhouse does
not accept electronic instructions that would require an original
signature. Information received by or sent from TD Waterhouse is
stored, subject to review, and may be produced to regulatory
authorities or others with a legal right to such.

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 07 2006 - 12:07:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US