10 Replies Latest reply: May 29, 2013 9:33 AM by 917702 RSS

    Single Node RAC on

      i have implemented Oracle Single Node RAC with 2 node. i have enabled ons on both node. for TAF it's working fine. but when we apply in java .. it is not working.. how can i implement in java...
      we had done all the methods using following links..

        • 1. Re: Single Node RAC on
          Victor Armbrust
          Why don't use SCAN for JDBC string?


          • 2. Re: Single Node RAC on
            Hi victor,
            i tried in both ways. through scan 1ly task should be completed.. in backend it works well.. but in front end getting disconnect...
            • 3. Re: Single Node RAC on
              Victor Armbrust
              Have you try to update your JDBC driver client version? Since it is 11gr2, should be ok with SCAN
              • 4. Re: Single Node RAC on
                Hi Victor,
                We are using Latest JDBC Driver 1ly, but no use..
                • 5. Re: Single Node RAC on
                  Sebastian Solbach -Dba Community-Oracle

                  have you checked:

                  Note: FCF and FAN does not provide select failover. Just a fast way to reestablish/refresh the connection pool.
                  The failover implementation has to be done in the (java) app itself.

                  You could use TAF for Java as well in connection with FAN. However this requires the FAT client, not JDBC thin.


                  • 6. Re: Single Node RAC on
                    Hi Sebastian,
                    We have configured like below in application. it connects well. Oracle Configured as Single Node Rac in
                    when i down the available server, 2nd node getting up, it works in backend whn i use TAF. when apply below method it returns ORA-17410 error .. could u check below code and suggest me to change to work..

                    OracleDataSource ods;
                         public Test2(){

                              java.util.Properties prop = new java.util.Properties();
                              prop.setProperty("MinLimit", "5"); // the cache size is 5 at least
                              prop.setProperty("MaxLimit", "25");
                              prop.setProperty("InitialLimit", "1"); // create 3 connections at startup
                              prop.setProperty("InactiveConnectionTimeout", "20"); // seconds

                              prop.setProperty("ConnectionWaitTimeout", "20"); // seconds
                              prop.setProperty("PropertyCheckInterval", "60"); // seconds

                              try {
                                   System.out.println(" --> Loading JDBC Driver.");
                                   ods = new OracleDataSource();
                                   // Set the user name, password, and so on
                                   //System.out.println("ONS Configuration file:"+ods.getONSConfiguration());
                                   ods.setURL("jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=rac-scan)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testrac)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = PRECONNECT)(RETRIES = 180)(DELAY = 5))))");


                              } catch (Exception e) {
                                   System.out.println("ERROR: Loading JDBC Driver");

                              System.out.println(" --> JDBC Driver Loaded Succesfully.");
                              // System.out.println(" --> ValidateConnection = " + prop.getProperty("ValidateConnection"));
                    • 7. Re: Single Node RAC on
                      Explain how you have a single node RAC on two nodes??
                      • 8. Re: Single Node RAC on
                        are you aware of oracle 11gr2 feature.. Rac One Node.. this RAC One Node 1ly i have implemented.. Please check below link for your reference..

                        • 9. Re: Single Node RAC on
                          Sebastian Solbach -Dba Community-Oracle

                          have a look on the following whitepaper (it includes a Java example on FCF and FAN, and especially what driver to use!)

                          Universal Connection Pool Documentation:

                          Check if you are using the correct data source with the correct connection pooling mechanism.
                          Furthermore: If you use FCF and FAN, then the reconnect/get connection out of the connection pool, is something the application has to do, after it received a client error.

                          Also: You connection string implies you want to use TAF
                          (TYPE = SELECT)(METHOD = PRECONNECT)(RETRIES = 180)(DELAY = 5)
                          but this is not available in JDBC Thin.... Just in JDBC Thick. And TAF + FCF won't work (just TAF with FAN).

                          • 10. Re: Single Node RAC on
                            Does anyone got any solutions as we are struck with same issue