Oracle SQLcl's new feature - save connections. Finally, I can use it as often as I'm using SQL Developer.

Do you know what always annoyed me about SQLcl? Manual input of my database details, such as connection string, username, and password.

I've always missed something that SQL Developer had for a long time - the SAVE CONNECTION feature.

And guess what? Yesterday's new 23.2 version of SQLcl changed it all (SQLcl release notes and docs, also introduced on Jeff's Smith blog)

Watch this.

Until yesterday, my connection looked like that:

sql rgrzegorczyk/PASSWORD@localhost:1521/XE
--or that if I had my  TNSNAMES configured
sql rgrzegorczyk/PASSWORD@MY_CONNECTION

Save your connection using the new CONNMGR feature (Managing stored connections)

Connect to your database using SQLcl as usual.

--on premise
sql rgrzegorczyk/PASSWORD@localhost:1521/XE
--walltet
sql /nolog
conn RAFAL/PASSWORD@rgatp_medium
--type SHOW TNS to see configured TNS connections

Save it!

conn -save MY_CONNECTION2 -savepwd

Skip -savepwd if you don't want to save the password.

Before saving the connection remember to connect with a string like username/password@host:port/sid. Otherwise, you won't be able to save a password for your connection.

Connect with ease!

According to the documentation, shorthand notation (i.e -n for -name ) should also be supported. However a bug has been logged for version 23.2

List your stored connections:

Preview saved connections:

Test your connection

Change the details of your saved connection (proceed like with saving the new connection but add REPLACE param)

Import connections from SQL developer:

It didn't work for me. I will update it after receiving an answer from Oracle.

Delete saved connections:

Missing feature, but you can delete it manually:

Windows -> %APPDATA%\DBTools\connections

Mac -> users/your_user/.dbtools/connections