5

I have Oracle 11gR2 set up on a RAC environment with two nodes. I have SCAN set up, eg: I have two entries on the DNS set up so I can ping the SCAN name and reach either node. I can also ping both -vip addresses.

In theory, the new SCAN feature should provide improved functionality over Transparent Application Failover (TAF), which required additional configuration in every client. With SCAN I can just connect to the SCAN address and I should be able to:

  1. Connect to the database and check which instance I am connected to, eg (on SQL*Plus):

    select instance_name, host_name from v$instance;
    
  2. Shut down the instance I am connected to using shutdown abort (in a separate session)

  3. On the same session where I performed step 1, if I re-run the same select statement, it should automatically bounce to the surviving node.

Instead, I am getting:

ORA-03113: end-of-file on communication channel
Process ID: XXXXX
Session ID: YYY Serial number: ZZ

What's going on?

Note: After step 2, I can exit out of SQL*Plus and reconnect just fine. It just won't work if I try to stay on the same session.


If I modify the tnsnames.ora in the client to something like:

RAC =
  (DESCRIPTION =
    (LOAD_BALANCE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = cluster-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (FAILOVER_MODE =
       (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5)
       )
    )
  )

Then it works the way I expect it to. And this is what had to be done prior to 11gR2, but SCAN is supposed to handle all this automatically, so a simple entry like:

RAC =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cluster-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

Should work the exact same way.

  • Uwe Hesse is absolutely correct regarding the reputation of the author of the link referenced - "this page". – user25489 Jun 29 '13 at 5:15
7

SCAN is supposed to give you connect-time failover, but not run-time failover (like TAF). Where did you get the (mis-)information that SCAN also means TAF?

  • The senior DBA here. He said he got his RAC setup to work just like that. – NullUserException Nov 2 '11 at 14:52
  • 1
    Well it aint so unless there was some additional configuration done. Like using an application service that got TAF attributes - this would be the modern way to do that instead of specifying the TAF parameters inside of the tnsnames.ora. srvctl -h | grep service should lead you to it :-) – Uwe Hesse Nov 2 '11 at 17:01
  • Hmmm, I give him a lot of credit because he's been the DBA since, well - forever, and we work at Oracle. This page also seems to indicate the new SCAN feature replaces TAF. – NullUserException Nov 2 '11 at 20:28
  • The page you linked to has a questionable reputation, to say it mild :-) I refer here to the official documentation - it states clearly that TAF is additionally to be configured: quote "If you configure transparent application failover (TAF) for the connection, then Oracle Database moves the session to a surviving instance when an outage occurs." And gives an example how to do that with srvctl: download.oracle.com/docs/cd/E11882_01/rac.112/e16795/… – Uwe Hesse Nov 3 '11 at 8:01
0

SCAN is not directly related to "better failover", the only difference is that you do not have to specify multiple HOST= entries because internally it adds all addresses behind the name to the host list. It is therefore only for easier management (basically using DNS as the service directory).

If you want TAF you need to configure this in addition to SCAN. The nice thing is you can configure this on the service, so you do not need to change your connection strings.

DBMS_SERVICE.CREATE_SERVICE() specifically has failover_type=BASIC, failover_retries=100, failover_delay=5 settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.