Trying to get sqlcl to connect / as sysdba to 11.2 RAC databases on our Exadata, which has 12.2.0.1 GI & 11.2.0.4 RDBMS home. The JRE in the 11.2 ORACLE_HOME is Java 1.5, which is not compatible with sqlcl. This configuration is able to make ezconnect connections to the databases on this platform.
alias sqlcl='/opt/sqlcl/sqlcl/bin/sql'
export ORACLE_SID=TEST11
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
export JAVA_HOME=/usr/java/jdk1.8.0_144/jre
Even with these settings, the CLASSPATH is configured with directories from the ORACLE_HOME before /opt/sqlcl/sqlcl/lib entries, although only ojdbc6.jar exists in this oracle home.
/u01/app/oracle/product/11.2.0.4/dbhome_1/jdbc/lib/ojdbc8.jar:
/u01/app/oracle/product/11.2.0.4/dbhome_1/ojdbc8.jar:
/u01/app/oracle/product/11.2.0.4/dbhome_1/jdbc/lib/ojdbc7.jar:
/u01/app/oracle/product/11.2.0.4/dbhome_1/ojdbc7.jar:
/u01/app/oracle/product/11.2.0.4/dbhome_1/jdbc/lib/ojdbc6.jar:
/u01/app/oracle/product/11.2.0.4/dbhome_1/ojdbc6.jar:
[oracle@exa011 TEST11]$ sqlcl /nolog
SQLcl: Release 18.1.1 Production on Mon Apr 16 10:04:20 2018
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
USER =
URL = jdbc:oracle:oci8:@
Error Message = Could not initialize class oracle.jdbc.OracleDriver
USER =
URL = jdbc:oracle:thin:@127.0.0.1:1521:TEST11
Error Message = Could not initialize class oracle.jdbc.OracleDriver
USER =
URL = jdbc:oracle:thin:@localhost:1521/orcl
Error Message = Could not initialize class oracle.jdbc.OracleDriver
USER =
URL = jdbc:oracle:thin:@localhost:1521/xe
Error Message = Could not initialize class oracle.jdbc.OracleDriver
Setting ORACLE_HOME to the wrong home, but one with a compatible JRE, does not raise any errors, but it obviously will not connect to the proper instance either.
[oracle@exa011 TEST11]$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1
[oracle@exa011 TEST11]$ sqlcl /nolog
[oracle@exa02dbadm01 AXSP11]$ sqlcl /nolog
SQLcl: Release 18.1.1 Production on Mon Apr 16 10:41:14 2018
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an Idle instance, startup command available.
SQL> exit
I've pretty much run out of ideas. I would expect that the proper ORACLE_HOME must be set for connect / as sysdba, which is causing other issues.
Doug