windowsoracle-sqldeveloperoracle-call-interfaceinstantclientthick-client

Getting Sqldeveloper working with instantclient on Windows without admin privileges?


I've installed Sqldeveloper Version 19.1 64-bit Version on an enterprise PC with Win10-64bit.

It works fine with embedded jdbc-client, but I need to get it working using the Oracle OCI-client. One reason is the much better support to cancel long running queries.

Using an OCI-client (thick-driver) requires for sure a client like instantclient_12_2. I have no admin privileges on my workstation and so copied the full instantclient_12_2 to the enterprise PC.

Since I'm not allowed to change the %PATH% myself, I created a start.bat file with required settings, because without, it also won't work (already tried).

PATH="C:\Users\myuser\OneDrive\Oracle\instantclient_12_2";%JAVA_HOME%;%PATH%
C:\Users\myuser\OneDrive\Oracle\sqldeveloper64\sqldeveloper.exe

When I try to configure another Oracle-Client without this change, I get another error, that PATH to instantclient needs to be defined before any others.

Now, starting sqldeveloper with this bat-file works fine. Connections can be established using the internal jdbc client.

Then, I've configured the Oracle Client in SQLdeveloper (Preferences/Database/Advanced) and selected the instantclient directory.

Pressing the "Test" button opens the Messages log "Oracle Client Test Results - Log" and shows an error.

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occured, Program will exit.
Unrecognized option: -

Now, I'm lost, because I'm not a Java-Expert. I'm wondering, why sqldeveloper as Java-tool is running, but the instant-client says it can't create the JVM.

The reason for me to use OCI-client is, that it has e.g. better support of User-breaks.


Solution

  • Without admin privileges and no permission to change your %PATH% env permanently, you only need to install the whole directory somewhere and add a .BAT file, that changes environment temporarily before calling SQL-Developer.

    1. Install complete SQL-Developer e.g. in C:\myprogs\sqldeveloper
    2. Install instant-client somewhere, e.g. in C:\myprogs\instantclient_12_2
    3. Create .BAT file, e.g. C:\myprogs\sqldeveloper\startsqldev.bat with following content:
    set PATH=C:\myprogs\instantclient_12_2;%PATH%
    REM start sqldeveloper
    "C:\myprogs\sqldeveloper\sqldeveloper.exe"
    

    It works for versions > 20 as well ;-)