Also, I have tried using the trick of launching sqldeveloper in a batch wrapper script and setting the Oracle Home to either the Thick or Thin client. For example:
REM set ORACLE_HOME=%C:\Oracle\product\instantclient_11_2%
Here is my JDBC connect string:
jdbc:oracle:oci:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = MY_SCAN.ADDRESS)(PORT = 1521))(LOAD_BALANCE = ON)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = DB_NAME.FULLY.QUALIFIED.NAME)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
Message was edited by: charlesdschultz
FYI - TOAD does TAF without any additional setup; using my default Oracle Home (thick client) and a TNS entry with TAF specified in tnsnames, I am able to transparently failover from one instance to another. I realize TOAD has a hefty support license fee, whereas SQL Developer is free. And believe you me, the support via these forums is awesome! But what can be done to make this feature work smoothly without all the hassles of client libraries and hard-to-understand error messages?
You definitely need OCI to use TAF.
If you go to the Help -> About -> Properties tab and scroll down to the name java.library.path, you should see its value is a construction that includes your Windows Path variable. The Path variable should include a reference to the bin directory of the Oracle client software where the ocijdbc11.dll lives. If it's missing, then that could be the problem.
Otherwise, reading through some old forum posts, it seems that error can also occur when SQL Developer has difficulty locating the tnsnames.ora file. The recommendation is to specify the location via Tools -> Preferences -> Database -> Advanced -> Tnsnames Directory. However, this case is applicable when Connection Type = TNS, and I assume you must be using Connection Type = Advanced with a Custom JDBC URL. If ocijdbc11.dll is on the Path, you should have the option of using either TNS or the Custom JDBC URL.
If Path is correct, I am not sure if it is absolutely necessary to set the ORACLE_HOME variable and enable the OCI/Thick driver preference, but it probably could not hurt.
Hope this helps,
Thanks, Gary, that helps. As stated on Jun 20, 2013 7:21 PM, I am now getting the T2CConnection.t2cCreateState gibberish.
Just curious, have you guys (including Turloch, orafad, etc) written a cookbook for getting SQL Developer working with TAF? In many posts surrounding this topic, I find users that end the conversation with "Thanks, that works now" but the rest of us don't really know what exactly is working. I am just curious if perhaps a particular environment (client version, SQL Developer version, configuration, etc) is known to work ubiquitously.
I think those old posts basically mean TAF should work as documented if the Oracle client environment is setup properly. I notice your URL includes a SCAN (Single Client Access Name) rather than distinct host names, and I recall at least one case of someone having had issues with SCAN, so perhaps that is throwing you an extra curve. Most posters say it works fine. This particular case may not be relevant to you, but I'll reference it:
Anyway, probably the next thing you should try is copying an Oracle client ojdbc6.jar file to <SQLDev_Home>\sqldeveloper\jdbc\lib. The gibberish error message seems to reflect a version mismatch between it and the dll. I believe 3.2.20 shipped with an 18.104.22.168 ojdbc6 implementation in that jdbc\lib directory. If SQL Developer does not pick up an ojdbc6.jar directly from your Oracle client install it will get it from its own jdbc\lib. You can check which ojdbc6.jar gets referenced via Help -> About -> Properties -> jdbc.library.
I am marking this as the correct answer because you have been so helpful; for the record, I was not able to verify that this is actually the correct answer because my harddrive crashed and I had to re-image my machine. After rebuilding it, SQL Developer works much better with TAF and the SCAN address. My personal conclusion is that over the years the various installs and deinstalls of Oracle software on Windows had somehow corrupted the registry and relevant environment variables. Again I lament how hard it is to manage Oracle software on Windows.