Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> 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-lReceived on Fri Apr 07 2006 - 10:47:58 CDT
![]() |
![]() |