Forum Stats

  • 3,733,349 Users
  • 2,246,746 Discussions
  • 7,856,664 Comments

Discussions

sqlcl 19.2.1 not working with Oracle DB Client 19.3

bpender-Oracle
bpender-Oracle Member Posts: 4 Employee
edited November 2019 in SQLcl

sqldeveloper works fine with DB Client 19.3 but sqlcl 19.2.1 is looking for ocijdbc18 which isn't part of DB Client 19.3

Error Message = no ocijdbc18 in java.library.path

I then tries 19.3 instant client

Error Message = no ocijdbc18 in java.library.path

Then I downgraded from DB Client 19.3 to 18.3, it says:

  Error Message = C:\app\client\BPENDER\product\18.3.0\client_1\bin\ocijdbc18.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

I also tried 18.5 instant client and got

  Error Message = C:\app\instantclient_18_5\ocijdbc18.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

RedWhiteNBlue

Answers

  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited November 2019

    Before doing anything else, make sure that your Java and Oracle  DB clients match in terms of being both 32-bit or both 64-bit.  Moreover, if your OS is 32-bit, the Java and Oracle DB clients must also be 32-bit.  If your OS is 64-bit, however, then you have a choice of using either both 32-bit Java and Oracle DB clients, or both 64-bit Java and Oracle DB clients.

    Now here is my experience in my current environment:

    1) The OS is 64-bit (Windows 10)

    2) My SQL Developer product.conf file points to Java (JDK) 1.8.0_221 64-bit as the Java home.

    3) My PATH environment variable value is prepended with the path to Instant Client 19.3.0.0 64-bit.

    4) I have Oracle 11g XE installed locally, but run VMs under Virtual Box for 12c, 18c, and 19.3

    When running SQL Developer, I configure the Database > Advanced preference to use the 19.3 Instant Client and the OCI/Thick JDBC driver.  So using SQL Developer 19.2.1 to connect to a 19.3 DB, I can run 'show jdbc' and 'show connection'  from the worksheet and see that I have an OCI8 connection using the 19.3 driver of the 19.3 instant client,  All is as expected and works fine.

    When running SQLcl, however, even though my shell environment setup script uses the same PATH value and points ORACLE_HOME to the 19.3 instant client and JAVA_HOME to JDK 1.8.0_221, something very different happens.

    First, since I have JDK 13.0.1 installed, SQLcl (sql.exe) uses that automatically and ignores my JAVA_HOME setting.  It also ignores the 19.3 instant client, but automatically finds an old 18.3 instant client that is also installed.  Finally, it uses the thin JDBC driver, rather than an OCI/Thick driver, even if I pass the -oci parameter on the command line. So SQLcl starts up and runs fine, except is uses a different Java, instant client, and JDBC driver type than I expect.

    In your case, I suspect that paying attention to the 32-bit / 64-bit matching rule will help tremendously. After that, SQLcl will start up so long as it at least finds a supported Java, and will fall through to using a thin JDBC driver if there is any problem with getting a OCI/Thick JDBC driver version that matches the requirements of the DB version.

    Cheers

    RedWhiteNBlue
Sign In or Register to comment.