The latest version of SQLcl is available today, that version being 24.2.
Our SQLcl product manager, Zachary Talke, has an overview blog post here you can read vs scanning the docs.
I want to do a deeper dive on these two nuggets –
- If connection attempts fail there is no longer a retry prompt and you will need to input the startup or connect command again.
- –thin parameter added to the sql startup command. This sets SQLcl to use the JDBC drivers.
Connecting, failing, trying again…
17.2 .. 24.1
I don’t have anything set in terms of Oracle environment variables, and I’m not giving SQLcl really anything to go on to make this connection request –
sql hr/bad
What SQLcl would previously do is make a couple of guesses to find what the likely connect string was, you can see we try both ‘orcl’ and ‘xe’ service names, on the local machine, on the default listener port, 1521.
And we attempt the connections several times, like 3.
24.2 and higher
We no longer assume anything, so ‘garbage in = garbage out.’
Now, if you happen to make a valid attempt to connect, and something fails, we’ll give you the error message, and that’s IT – no more retries.
-thick vs -thin
Oh this is one of my favorite topics. — insert sarcasm emoji here
‘thin’ refers to ‘jdbc thin,’ as in our java application will attempt a connection using only the jdbc driver that SQLcl ships.
‘thick’ says we’re going to use the $ORACLE_HOME or Oracle Client to connect, and i that case also it’s accompanying JDBC driver.
If you’re on a machine with an Oracle client or server, SQLcl will try a ‘thick’ connection.
This behavior is the same between 24.1 and 24.2.
But what’s new is that 24.2 offers this parameter, ‘-thin’ which tells SQLcl to ignore that it’s found an Oracle HOME and just stick with the jdbc driver for connecting.
If we try to connect again, leaving no flag at all…it goes back to trying the THICK connection.
Let’s look at the application help text…
This is where ‘-thin’ and ‘-thick’ are defined, as well as much more:
sql -h
We’ve improved the help and examples for connecting as well.
help connect