Export and Import VS Code Connections with Oracle SQLcl 26.1
Learn how to export, import, and share Oracle SQL Developer for VS Code connections using the new SQLcl 26.1 CONNMGR commands, including folder exports, secrets, and duplicate handling.

Oracle APEX developer at Pretius
Because the Oracle SQL Developer Extension for VSCode is something like an industry standard right now, sooner or later you will have to export your connections, so you can pass it to your teammate.
Until now, it was not possible to do it in the extension or with the SQLCL. But from the new version 26.1. the connection manager command CONNMGR is able to do it.
So let's see how it works, what to expect and what to be aware of.
Connection Manager - Export
The CONNMGR can now do many things. It can:
Clone
Import
Export
List
Show
Test
For this example, I use my folder with connections. I have a main folder MyConnections with dev and test connection and a subfolder for production connections.
Export command specifically can help you in three ways:
Export all connections
Export specific connections
Export connections from a specific folder (including subfolders)
To be able to export the connections with passwords, I have to setup a KEY. To do it, I can simply use command below:
SECRET SET mySecret Mysecretvalue123!
For my case the best option is the Folder export. So the command should look like below:
CONNMGR EXPORT -key mySecret -folder /MyConnections MyConnections
This will export whole folder MyConnections, but be aware, it will lack the structure. To preserve it you have to add -preserve-folders or -p option, that will keep the folder hierarchy. So the perfect command will look like this:
CONNMGR EXPORT -key mySecret -preserve-folders -folder /MyConnections MyConnections
I have my key, I have my command, let's see it in action.
First I login to my SQLCL 26.1., then I set the key and run the command.
sql /nolog
--SQLcl: Release 26.1 Production on Mon Jun 15 16:29:17 2026
--Copyright (c) 1982, 2026, Oracle. All rights reserved.
SECRET SET mySecret Mysecretvalue123!
--Secret mySecret stored
CONNMGR EXPORT -key mySecret -preserve-folders -folder /MyConnections MyConnections
--Successfully exported 4 connection(s) to MyConnections
Now I have my connections exported, the file will be stored at a location where you opened the Terminal.
Connection Manager - Import
The import is very straightforward.
Please be aware that if you just login to your SQLCL and you try to do the import, the key will not exist. I am not sure if you have to set it up in a different way to make it persistent, or if this is intentional feature. But it did not survive the disconnect.
SQL> CONNMGR IMPORT -KEY mySecret MyConnections
--Secret mySecret not found. Use SECRET SET to create a secret first.
So you have to literally do the same steps as with the export.
sql /nolog
--SQLcl: Release 26.1 Production on Mon Jun 15 16:29:17 2026
--Copyright (c) 1982, 2026, Oracle. All rights reserved.
SECRET SET mySecret Mysecretvalue123!
--Secret mySecret stored
CONNMGR IMPORT -KEY mySecret MyConnections
--Importing connection TEST_CONNECTION: Success
--Importing connection PROD2_CONNECTION: Success
--Importing connection PROD1_CONNECTION: Success
--Importing connection DEV_CONNECTION: Success
--4 connection(s) processed
Also the import is smart and if you have already same connections, it will let you know as on the screenshot below.
CONNMGR IMPORT -KEY mySecret MyConnections
--Importing connection TEST_CONNECTION: Failure - Duplicate connection
--Importing connection PROD2_CONNECTION: Failure - Duplicate connection
--Importing connection PROD1_CONNECTION: Failure - Duplicate connection
--Importing connection DEV_CONNECTION: Failure - Duplicate connection
--4 connection(s) processed
After you are done with the import, you can simply hit Refresh button on the Extension.
And the connections will appear.
Summary
Now you know how you can securely export and import your connections from Oracle SQL Developer Extension for VSCode and share them with your teammates. I hope you will find this article helpful.
As always, thank you for reading my article and have a nice day.



