The specific (very recent) version of sqlcl you are using also expects a very recent version of Oracle client software to make an OCI connection.
Here I connect to Oracle 11g XE using sqlcl 19.4 with the Oracle 19.3 instant client installed. Note that my Oracle_Home and Path point to the Oracle 19.3 instant client.
Hi Glen. I remember you participating in the original discussion. Your posts are very helpful. Some suggested that there was a way I could connect by using an easy connect string or something to that effect. I think that suggestion is showing that its not really possible. So, I'm left with what you're suggesting as a last attempt to make it work. So bizarre how regular users can connect without all the brouhaha but the sys user cant. Oh well. It is what it is.
I guess barring Oracle's desire to make SQLCl 19.4 backwards compatible with their very popular 18c Express Edition I'll have to give your suggestion a real effort.
Installing the Oracle 19.3 instant client won't mess up anything with my current system setup I hope? I've had next to no problems with Oracle's 18.4 XE on my system.
Thank You for your help.
Installing the Oracle 19.3 instant client won't mess up anything with my current system setup I hope?
Well, I suppose it could mess things up. But I would suggest leaving ORACLE_HOME and PATH alone as defined in your Windows registry, and instead create a wrapper script (bat file) to run sql.exe after those two environment variables have been set as desired. Note that "Set as desired" could mean "set not to include any Oracle client at all". If that is the case, then sql.exe should opt to use a JDBC thin driver. For example, here I create a "thinsqlcl.bat" to run sql.exe without access to an Oracle client, and connect to Oracle 11g XE. Here is the result:
When I check my Windows 10 command-prompt environment variables using the SET command, it doesn't even show that ORACLE_HOME has been set. It does not show any variable that would be Oracle related. The only thing it does show is that my PATH environment variable has been modified to include product\18.0.0\dbhomeXE\bin and Common Files\Oracle\Java\javapath.
There are quite a few oracle variables defined in the actual Windows registry though. I have executed SELECT * FROM V$PARAMETER; to see if there are any direct matches from the Windows registry to the aforementioned query and I don't see any.
I guess those are all loaded from the registry when the SQLcl is launched and any SET environment variables would be processed next for a higher precedence.
It almost worked. I guess I downloaded the AMD version instead of the Intel version that I need. The package just said windows.x64. I didn't realize that was AMD only.
F:\app\Keeanu\\product\instantclient_19_6\ocijdbc19.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform" My processor is an Intel SkyLake CPU. That's a 64-bit CPU as far as I know.
***EDIT***: I think I just found a 6-month old post of yours that explains this issue. My JRE is in the x86 folder which is 32-bit stuff on Windows: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
So, do I just download a 64-bit version of the JRE and then I'm good to go?
***EDIT #2***: "Error Message = Incompatible version of libocijdbc[Jdbc:193000, Jdbc-OCI:196000". So, I downloaded the latest "Instant Client" thinking it would be okay. I guess I was too ambitious in my efforts. It's amazing how fragile some of this software is. The "Instanct Clients" are only 3 minor versions apart. I'm still baffled by how regular users can log in okay even though these incompatibilities exists but when I try the sys/oracle account I get all these error messages. Is there any way to make these work together? Or should I just install the 19.3 Instant Client?
***EDIT #3***: I went back to try and download "Instant Client 19.3". There was no such link. It's 19.6 or nada it seems. So, I'm not sure what I can do now?
1 person found this helpful
I am happy to see you worked out the 32-bit vs 64-bit coordination issue with the Oracle client and Java JRE.
With respect to the Oracle 19.6 Instant Client, I get the same problem you do with sqlcl 19.4 -- no ability to make an OCI JDBC connection! But the 19.3 Instant Client works great. Since you cannot get a download for that, all I can say is that sqlcl 19.2.1 using the 18.3 Instant Client also works fine, presumably that is equivalent to what you get with 18c XE.
I am actually afraid to download the 18.5 Instant Client to see if that also gets an OCI JDBC connection with sqlcl 19.2.1. There must be something wrong, the software should not be that "fragile".
It seems there is no offering for any download of sqlcl 19.2.1 on their sqlcl downloads page:
This company is running a tight ship on what they let people download. I've overcome almost every other issue with regards to 18.4 XE and SQL*Plus. No issues with SQL Developer either although I've used it quite a bit less than SQL*Plus...still, no issues. Although, even as I try and work through this issue I think I've learned a few things that are beneficial. So, i'ts never a total waste.
Still, I'm starting to wonder if I should just forget that SQLCL even exists. Although, I can use it with regular user accounts so maybe I'll just do that. Keep the sys session on SQL*Plus and every other lesser sesson on the SQLCL.
1 person found this helpful
Don't give up yet! Although we cannot chain backward through all the old versions like we used to, it still works for a few versions. In the download page, below the SQL Developer downloads for the various platforms, there is a line that says "Troubleshooting - Previous Version". The "Previous Version" part is actually a link to the previous version, which also includes the previous version sqlcl download right below that line.
The link references v192 rather than v1921, but v192 had a serious enough bug that the "v192" downloads just got overwritten by the v1921 versions.
Thank You very much. I'll give this a shot soon.
***EDIT***: IT WORKS! WOO HOO! I guess. Hehehehe. Yep, first try: sys/oracle@XEPDB1 AS SYSDBA.
So, I guess this is the best I can get for free anyway. Almost the latest version. Thank You.