Re: TAF with Oracle RAC

  • From: Stefan Koehler <contact@xxxxxxxx>
  • To: Karth Panchan <keyantech@xxxxxxxxx>, ckaj111@xxxxxxxx
  • Date: Thu, 23 Jul 2015 19:07:24 +0200 (CEST)

Hi Chris,
this does not sound right for your scenario. Karth's request was about DML
failover - the details could be checked here:
https://www.freelists.org/post/oracle-l/Oracle11g-TAF-FANFCF,2

However i rebuild your configuration in my 12c RAC lab to show you the expected
behavior - so here it is:
********************************************8<******************************************************************
--- TAF session as user TEST
TEST@TST:328> create table t (a number);
TEST@TST:328> insert into t values (1);
TEST@TST:328> commit;

TEST@TST:328> select * from t;
A
----------
1

TEST@TST:328> select host_name from v$instance;
HOST_NAME
-------------
OELRAC2

--- Monitoring session as user SYS
SYS@TST:330> SELECT INST_ID, SID, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER
FROM GV$SESSION where USERNAME = 'TEST';
INST_ID SID FAILOVER_TYPE FAILOVER_M FAI
---------- ---------- ------------- ---------- ---
1 328 SELECT PRECONNECT NO
2 328 NONE NONE NO


*** Power off VM OELRAC2 which currently hosts session 328 for user TEST.
Please don't be confused by the instance IDs. INST_ID 1 runs on node OELRAC2
and INST_ID 2 runs on node OELRAC1 in my RAC lab ***

--- Monitoring session as user SYS
SYS@TST:330> SELECT INST_ID, SID, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER
FROM GV$SESSION where USERNAME = 'TEST';
INST_ID SID FAILOVER_TYPE FAILOVER_M FAI
---------- ---------- ------------- ---------- ---
2 328 NONE NONE NO

--- TAF session as user TEST
TEST@TST:328> select * from t;
A
----------
1

TEST@TST:328> select host_name from v$instance;
HOST_NAME
----------------------------------------------------------------
OELRAC1
********************************************8<******************************************************************

I used your tnsnames.ora configuration for this demo and no ORA-03113 as you
can see. This should be the behavior in this exact scenario (no running
SELECTs or DMLs in the user session at point of instance crash) that you
described.

I have used a 11.2.0.4 OCI client and a 12.1.0.2 RAC RDBMS. I don't know what
is wrong in your environment as there were several client TAF bugs as
well and we don't have enough information about your env. Please also be sure
that you don't test this as SYSDBA like Bertrand already mentioned. Have
you set some additional SQL*Net time-out parameters?

P.S.: Please use server side service TAF configuration and not at client side.
It does not matter for your current faced issue, but it is an
adminstration based thing :-)

Best Regards
Stefan Koehler

Freelance Oracle performance consultant and researcher
Homepage: http://www.soocs.de
Twitter: @OracleSK


Chris King <ckaj111@xxxxxxxx> hat am 23. Juli 2015 um 18:37 geschrieben:

That sounds right on. I hadn't mentioned the version I'm working on,
though.. unfortunately this issue is occurring on version 11.2.

Is it therefore the normal behaviour for RAC, if a node fails, for a user
session to lose the connection, get an error message, then reconnect to
the other node? And therefore it's up to the application to handle the error?

---------------------------------------------
From: Karth Panchan <keyantech@xxxxxxxxx>
To: "christopherdtaylor1994@xxxxxxxxx" <christopherdtaylor1994@xxxxxxxxx>
Cc: "softice@xxxxxxxxx" <softice@xxxxxxxxx>; Chris King <ckaj111@xxxxxxxx>;
Oracle-l Digest Users <oracle-l@xxxxxxxxxxxxx>
Sent: Thursday, July 23, 2015 12:27 PM
Subject: Re: TAF with Oracle RAC


Stefan Koehler from this group provided below details for similar question
raised by me. Credit to him.

Chris feature you looking available in oracle12c

See below comments from Stefan Koehler

DML operations and session states are not covered by TAF. TAF and session
fail-over works without any additional setup. However you can
intercept the fail-over and your application needs additional code / logic
to restart the transaction (e.g. by using CallbackFn function), if you
want
to go a little bit further and do a SELECT fail-over (no automatic DML
replay!).

The functionality you are looking for is called "Application Continuity" and
it is available with Oracle 12c
-
http://www.oracle.com/technetwork/database/database-cloud/private/application-continuity-wp-12c-1966213.pdf
-
https://martincarstenbach.wordpress.com/2013/12/13/playing-with-application-continuity-in-rac-12c/
--
//www.freelists.org/webpage/oracle-l


Other related posts: