Re: TAF and node failover non RAC oracle 10.2

From: Jakub Wartak <vnulllists_at_pcnet.com.pl>
Date: Thu, 31 Jan 2008 10:19:27 +0100
Message-Id: <200801311019.27414.vnulllists@pcnet.com.pl>


Dnia środa, 30 stycznia 2008 10:19, hrishy napisał:
> Hi
>
> Can TAF be used to detect node failover and redirect
> the connections to a new node using retry and delay so
> all my clients detect that host db1 is down and need
> to start connecting to db2 .
>
> I am not using RAC.Oracle version is 10.2

Yes it can. I have done it for (own, non-commercial) educational purposes with DataGuard (with Fast-Start Failover). The trick is to have additional SERVICE_NAME registered to listener using DBMS_SERVICE.START_SERVICE from AFTER DATABASE STARTUP trigger.

tnsnames.ora on client looks like this:
dbdesc=(DESCRIPTION=(ADDRESS_LIST=

(ADDRESS=(PROTOCOL=TCP)(HOST=10.99.1.61)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=10.99.1.62)(PORT=1521))
(LOAD_BALANCE=off))
(CONNECT_DATA=(SERVICE_NAME=yourHAservicename))(SERVER=DEDICATED))

Then I've used the thin JDBC driver (it supports TNS so you can point to this dbdesc; tested using Hibernate and JBOSS). The service is only launched on current PRIMARY, so client checks if listener provides "yourHAservicename". If yes then it tries to connect to that one, if no: client tries next one...

BTW. TAF supports two kinds of failovers SESSION and SELECT (this is configured using DBMS_SERVICE.CREATE_SERVICE or by using TNS connect string).

I'm not sure whether you are going to utilize DataGuard to provide sync of databases or maybe something other. If you would use some kind of storage replication (SRDF / DRBD or something similar) then you are going to have a lot more problems I think:

- manual HA failovers/switchovers (starting and stoping of databases)
- storage replication should gurantee non-reordered writes 
- manual storage replication takeovers and so on

-- 
Jakub Wartak
http://vnull.pcnet.com.pl
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 31 2008 - 03:19:27 CST

Original text of this message