This post is a list of suggestions and tips to make your transition as easy as possible. The biggest obstacle or challenge will be for folks who have NEVER used VS Code before.
If that’s you, expect:
- a learning curve
- an amazing coding and editing experience
VS Code is a great platform with millions of developers and IT pros using it to build amazing things on just about every tech stack and programming language and framework you can think of. It was a natural fit, and logical decision for us to keep the SQL Developer legacy going strong by porting it to VS Code as an extension.
This is a long post, but, it’s not that crazy to get started. The main advice or takeaway I have is that with use comes comfort. And if you’re working with CSV, JSON, Python, Java, JavaScript, …. – go get an extension for those platforms/techs and use VS Code to work with those files, too!
You’re coming from here…2005 SQLDev
And we’re headed to here…2024 SQLDev
Note: Oracle SQL Developer isn’t getting any new features, we’re putting those into the VS Code Extension. This doesn’t apply to SQLcl or SQL Developer Web.
Step 1: Export your SQL Developer Connections
Right-click on the Connections’ panel’s first tree node, and select ‘Export Connections.’ Choose the connections you want, supply a password to properly protect your passwords.
Save this file, keep it handy.
But wait, I’m not using SQL Developer, but I am using the older, deprecated Oracle Developer Tools Extension – how do I migrate THOSE connections? This might help.
Step 2: Identify the login.sql and tnsnames.ora files you’re using
In SQL Developer, you may have specified a script to run as new connections are established and a directory where your TNSNames.ora files can be found.
‘Grab these files,’ you’ll need them later.
Step 3: Install VS Code
Go to the download site https://code.visualstudio.com/download, find your platform, and ‘do the needful.’
Step 4: Start VS Code, install our plugin!
In the Extensions marketplace, you’re going to search for ‘SQL Developer.’ Find your logo, and click the ‘Install’ button.
You’re going to see a series of messages in the bottom panel.
After the extension has been successfully installed and ‘activated,’ you’ll see the SQL Developer logo on the left.
That means you’re ready to get started! As the kids would say, LFG!
Remember those connections we exported? Yeah, we need those now.
Step 5: Import your connections
Read the step-by-step blog post.
Here’s a super-quick set of steps. We’re going to launch SQLcl, the command-line version of SQL Developer.
It’s really easy to get a really nice terminal in VS Code. And our extension comes with SQLcl.
After click that, you should see something like this –
We’re going to run two commands.
1. Register the password we used to secure our connections export
We’re never going to store oracle database connection passwords in clear text, so in order to access them, we need the ‘secret’ or key used to protect them.
sql > secret set connections password
Secret connections stored
sql >
Ok, now that’s in there, we can do the import.
sql > connmgr import -key connections /path/to/connections.json
Note you can also simply ‘cd’ to the directory first, in SQLcl, and then just reference the .json file from where you exported the connections from SQLcl.
After running this you’l see an inventory list of connections being parsed and then their import status, hopefully…’Success’
That will look like this:
Once this is done, we should now see those same connections in VS Code!
A few notes
- not all connection types are supported, yet
- connection folders aren’t supported, yet – coming soon (25.1)
- connection colors are supported, but you can add those with this trick
Step 6: Setting up your preferences
Two of these you can probably guess, the aforementioned login.sql and tnsnames.ora properties. Note that we’ll look for your tns file by default wherever your TNS_ADMIN OS envar is pointed, but this allows you to specify the one you want.
In VS Code, there are settings, and in these settings there are sections reserved for Extensions.
There are some more settings you want to look at…
Step 7: Start having fun!
If you’ve moving over from SQL Developer, a lot of the user experience should feel very similar. Run queries as statements or scripts, get explain plans, right click on things to do stuff like export your query results. Click to browse your dictionary in the tree. Open objects, or drag and drop them to the worksheet to generate code.
But hey, you’ve done enough reading! How about watching a video!
Don’t forget to personalize
Speaking of having fun, one of the genuinely fun things to do is go through all the look and feel templates/skins or what they call ‘themes’ for VS Code. Some are built-in, others can be installed as an Extension.
Bonus Time
That video was cut about 7 months ago. We’ve added a TON of features since then. The extension offers more things you’re used to from SQL Developer including:
- PL/SQL Debugger (video)
- Real Time SQL Monitor
- Cached Plans/DBMS_XPLAN
- Reports
About that learning curve…
Ready to learn more? Here’s another post showing you the ropes from a SQL Developer user experience and background, VS Code primer + Tips & Tricks.
For example, where did they put the stupid &@#$&! code outline?!?
Right here –
Jeff, I have MORE questions!
Ok, ok, ok…
Frequently asked questions
Are you going to add feature X? It’s my favorite feature and I can’t use this tool without that feature.
We’re replacing SQL Developer with this extension. If it was popular in the old tool, you can rest assured it’s on our roadmap. If you want to know ‘for sure,’ leave a question on this post. But yes, the query, developer, dba, and design features are all going to come over.
What about connection colors?
How can we cancel queries?
You have two options, but here’s one.
How can we see two query results at the same time?
We’re working on support that. For now you could run a query in SQLDev, and then run another one in the integrated SQLcl terminal as a workaround.
I have too many connections, where are the folders?
We’re building that support into the extension RIGHT NOW. Expect that to drop early in 2025.
How do we debug our PL/SQL?
What about Data Modeler?
It’s going to get similar treatment, stay tuned!