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.
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
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 -> C:\users$USER\dbtools\connections
Mac -> users/your_user/.dbtools/connections