This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,592 Users
  • 2,269,776 Discussions
  • 7,916,825 Comments

Discussions

Error in new version of sqlcl when connecting via BEQ (local DB)

John Stegeman
John Stegeman Member Posts: 24,269 Blue Diamond
edited May 4, 2016 10:46AM in SQLcl

Hello everyone,

Just grabbed the new version of sqlcl (sqlcl-4.2.0.16.112.0616-no-jre) from OTN, and local DB connections appear to no longer work.

I have a 12.1.0.2 standard edition database running (SID is XE, but it's not Oracle XE ) locally on Windows. I am not running a listener. When I try to connect locally with the new release, I get an error: Incompatible version of libocijdbc[Jdbc:121010, Jdbc-OCI:121020. It works with the previous version.

Here's the proof (yes, it's really Windows. I'm using ConEMU as my command line, so don't be fooled into thinking it's *nix):

[email protected]_MACHINE C:\o\sqlcl\bin
$ set ORACLE_SID=XE


[email protected]_MACHINE C:\o\sqlcl\bin
$ sql scott/tiger


SQLcl: Release 4.2.0.16.112.0616 RC on Fri Apr 22 08:48:12 2016


Copyright (c) 1982, 2016, Oracle.  All rights reserved.


  USER          = scott
  URL           = jdbc:oracle:oci8:@
  Error Message = Incompatible version of libocijdbc[Jdbc:121010, Jdbc-OCI:121020
  USER          = scott
  URL           = jdbc:oracle:thin:@127.0.0.1:1521:XE
  Error Message = IO Error: The Network Adapter could not establish the connection
  USER          = scott
  URL           = jdbc:oracle:thin:@localhost:1521/orcl
  Error Message = IO Error: The Network Adapter could not establish the connection
Username? (RETRYING) ('scott/*********'?)
Warning: You are no longer connected to ORACLE.


[email protected]_MACHINE C:\o\sqlcl\bin
$ cd ..\..\sqlcl.old\bin


[email protected]_MACHINE C:\o\sqlcl.old\bin
$ sql scott/tiger


SQLcl: Release 4.2.0.16.049.0842 RC on Fri Apr 22 08:48:31 2016


Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production




SQL>


Edit:

Just for additional information, in case it's pertinent:

Microsoft Windows [Version 10.0.10586]


[email protected]_MACHINE C:\Users\stegemanj
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

A further edit:

I never asked my questions

Is this a known issue, and are there any workarounds? Yes, I can always fire up the listener and connect that way, but I tend not to have my listener running on my laptop - it's just for playing around/testing.

Answers

  • Kris Rice-Oracle
    Kris Rice-Oracle Chief Build Breaker Posts: 1,393 Employee
    edited May 3, 2016 1:49PM

    unset your ORACLE_HOME.  The issue/bug here is we're detecting that you have an $OH set and trying to use that over what is included.  There's lots of reasons that's a good idea but clearly needs some protection around it to make sure it's some min version like sqldev does.

    -kris

  • John Stegeman
    John Stegeman Member Posts: 24,269 Blue Diamond
    edited May 4, 2016 7:07AM

    Hi Kris,

    Thanks for that suggestion - I'm on Windows - no ORACLE_HOME set in the environment variable - just in the registry. Not practical for me to unset it in the registry, so for now, I'll just carry on using TNS to connect locally. Unfortunately, that means no "/ as sysdba" but there's always sqlplus until the bug is sorted.

    John

  • John Stegeman
    John Stegeman Member Posts: 24,269 Blue Diamond
    edited May 4, 2016 7:07AM

    Hi Kris,

    Thanks for that suggestion - I'm on Windows - no ORACLE_HOME set in the environment variable - just in the registry. Not practical for me to unset it in the registry, so for now, I'll just carry on using TNS to connect locally. Unfortunately, that means no "/ as sysdba" but there's always sqlplus until the bug is sorted.

    John

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Master Product Manager NC, USAPosts: 8,927 Employee
    edited May 4, 2016 10:25AM

    You can always connect sys as sysdba, bequeath or no...although are you using SQLcl to startup or shutdown the database?

  • John Stegeman
    John Stegeman Member Posts: 24,269 Blue Diamond
    edited May 4, 2016 10:46AM

    Good point - you can still do sysdba over net, just not with OS authentication.

    No, I really shouldn't be using sysdba, I know, but on my local laptop - I do it all the time rather than create a DBA account. It's just a playground. In real environments, no, I'd never use that.