Re: RAC design question

Hi Freek,

you are right-TAF can work if you don't shut the instance down via srvctl. I have tested this quickly, the environment is the same as before.

[oracle@rac11gr2drnode1 ~]$ srvctl stop service -d orcl -s oraclel
[oracle@rac11gr2drnode1 ~]$ srvctl remove service -d orcl -s oraclel
[oracle@rac11gr2drnode1 ~]$ srvctl add service -d orcl -s oraclel -r orcl1 -a orcl2
[oracle@rac11gr2drnode1 ~]$ srvctl start service -d orcl -s oraclel
[oracle@rac11gr2drnode1 ~]$ srvctl config service -d orcl -s oraclel
Service name: oraclel
Service is enabled
Server pool: orcl_oraclel
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: orcl1
Available instances: orcl2

[oracle@rac11gr2drnode1 oracle-l]$ sqlplus martin@oraclel

SQL*Plus: Release Production on Wed Aug 17 09:21:43 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select inst_id,sid,serial#,FAILOVER_TYPE, failover_method, failed_over
  2  from gv$session where sid=(select distinct sid from v$mystat)
  3  and inst_id = sys_context('userenv','instance');

---------- ---------- ---------- ------------- ---------- ---
         1        157      10015 SESSION       BASIC      NO

Killed the instance:

[oracle@rac11gr2drnode1 ~]$ ps -ef | grep smon_orcl
oracle   14311 14144  0 09:23 pts/2    00:00:00 grep smon_orcl
oracle   17291     1  0 Aug16 ?        00:00:04 ora_smon_orcl1
[oracle@rac11gr2drnode1 ~]$ kill -9 17291
[oracle@rac11gr2drnode1 ~]$ ps -ef | grep smon_orcl
oracle   14350 14144  0 09:24 pts/2    00:00:00 grep smon_orcl

[oracle@rac11gr2drnode1 ~]$ srvctl status database -d orcl
Instance orcl1 is not running on node rac11gr2drnode1
Instance orcl2 is running on node rac11gr2drnode3
Instance orcl3 is running on node rac11gr2drnode4
[oracle@rac11gr2drnode1 ~]$

In the same session as before:

SQL> /
select inst_id,sid,serial#,FAILOVER_TYPE, failover_method, failed_over
ERROR at line 1:
ORA-25408: can not safely replay call

SQL> /

---------- ---------- ---------- ------------- ---------- ---
         2        153         15 SESSION       BASIC      YES

And it worked, nice.


On 17/08/2011 09:09, D'Hooge Freek wrote:

There is an error in your post.
When shutting down an oracle instance using srvctl, the session will no longer 
failover in 11.2 but instead will be stopped (unless you use the -f flag).

See the update on the end of the following blog post:

Normally your (select) session will correctly failover with a preferred / 
available config and TAF.
I hope to be able to create a test case this afternoon.


Freek D'Hooge


Other related posts: