Link to home
Start Free TrialLog in
Avatar of tyronetse
tyronetse

asked on

Expected Outcome of Testing Failover on Oracle RAC 10G R 2 database

I installed Oracle 10g RAC On Windows 2003 Using VMware Server, in order to test to see if my companies Websphere J2EE application would run on Oracle RAC database. I had to change the JDBC URL format from "jdbc:oracle:thin:@<hostname>:1521:ORCL"
to
"jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=rac2-vip)(PORT=1521))
(LOAD_BALANCE=yes))(CONNECT_DATA=(SERVICE_NAME=RAC.WORLD)))"

Once I did that, the J2EE application was able to connect to the Oracle RAC database and application ran fine.

I then decided to test Oracle failure, by simply disconnecting the rac1-vip Node from the network, I expected that my J2EE application would still work, as the second Oracle RAC Node rac2-vip is still connected to the network.
This did not happen, and my J2EE application lost its connection to the database.
I was also connected to the database via my TOAD client, and this also lost its connection to the database.

What should of been the expected outcome of disabling one of the clustered nodes in an Oracle RAC'd database? Should the database connection of been lost or not?


Could it be the Websphere server or could it be the version of the Oracle Thin JDBC drivers that my J2EE application is using?

Avatar of Sean Stuber
Sean Stuber

You need to set your FAILOVER_MODE

also check your LISTENER configuration.

Read chapter 13 of the Net Services Admin guide about Transparent Failover
Try like this : jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vip-db01-lisqa.ctn)(PORT=1529))(ADDRESS=(PROTOCOL=TCP)(HOST=vip-db02-lisqa.ctn)(PORT=1529))
(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME=QADB)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)
(RETRIES=180)(DELAY=5))))

Also present the output :

sql > show parameter remote_listener


LSNRCTL > start remote_listener vaule


Present the output of the above two syntax and try with the above jdbc connect string alter is as per your requ.

Avatar of tyronetse

ASKER

I logged into sqlplus as sys and did the command

    sql > show parameter remote_listener
Which returned
     LISTENERS_WRAC

I then opended another windows cmd window and did the command

LSNRCTL > start remote_listener  LISTENERS_WRAC

TNS-01151: Missing listener name, remote_listener, in LISTENER.ORA

Here are the contents of the database servers LISTENER.ORA file
SID_LIST_LISTENER_WRAC1 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER_WRAC1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = wrac1-vip.localdomain)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.241)(PORT = 1521)(IP = FIRST))
    )
  )



did you change your connect string to include the failover_mode?


also...

change your remote_listener to "LISTENER_WRAC1"  instead of "LISTENER_WRAC"
When you say set failover_mode do you mean like this in my JDBC url string

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost2)(PORT=1521))
(LOAD_BALANCE=yes)(FAILOVER=yes))
(CONNECT_DATA=(SERVICE_NAME=MYDBNAME.WORLD)))
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can the FAILOVER_MODE option be used with the Oracle Thin JDBC driver.
The TAF documentation says it is an OCI protocal which I think can only be used with the thick OCI JDBC driver and I've read under chapter Fast Connection Failover is supported under the Oracle Thin driver.

Hey ,
 I m sorry instead of asking you for the status of remote listener,i mistakenly typed it as start.

Lnsrctl > status LISTENERS_WRAC

The above will show us the status of the registered service names. This will be more helpful for us to check the status of Load balance.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help guys