Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

John StegemanApr 22 2016 — edited May 4 2016

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):

stegemanj@MY_MACHINE C:\o\sqlcl\bin

$ set ORACLE_SID=XE

stegemanj@MY_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.

stegemanj@MY_MACHINE C:\o\sqlcl\bin

$ cd ..\..\sqlcl.old\bin

stegemanj@MY_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]

stegemanj@MY_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.

Comments

Kris Rice-Oracle

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

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

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

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

John Stegeman

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.

1 - 5

Post Details

Added on Apr 22 2016
5 comments
1,763 views