Run SQL Developer from Microsoft VS Code


If you have been using Oracle SQL Developer for decades, then there is news for you. Oracle SQL Developer is entering it’s new life!!! You can now run Oracle SQL Developer from Microsoft Visual Studio Code.

Microsoft Visual Studio Code is one of the top development platforms available today. It’s open source, it’s free, and it is a super-powerful editor. VS Code has an enriched extension framework, where developers/users can create extensions to make VS Code a more power tool.

According to Jeff Smith ( Distinguished Product Manager, Oracle) : “Implementing modern features like Dark Mode called for a new platform that allowed delivering the best SQL and PL/SQL IDE, database administration, and reporting experience for the Oracle Database. VS Code gives us that platform, and has been adopted by the development community.”

At the time of writing this blog, Oracle plans to partly migrating Oracle SQL Developer features to the VS Code extension. Once all the features are moved over, Oracle SQL Developer, as we see it today, will be deprecated. No new features will be added to the existing SQL Developer.

In this post, we will see how we can add Oracle SQL Developer extension added to the VS Code GUI.

Prerequisites

Download Microsoft Visual Studio Code from here and Install.

Adding SQL Developer Extension

Once you have installed VS Code, click on extensions(as shown below), and type “Oracle SQL Developer”, and click on Install.

Once the SQL Developer extension is installed, the SQL Developer logo will appear.

Click on SQL Developer. If you are setting up connections in VS Code for the first time and then, click “Create Connection”.

If you already have one or more connections set-up, then click on the Add icon.

This will bring up the familiar connection window. Pop-in the connection details, and click on Test.

If the connection is successful, you should see the status at the bottom-right corner.

Click Save. The new connection should appear now under connections.

Right click on the connection and click on Connect.

Like in SQL Developer, you can browse through the schema objects.

To open a Worksheet, right click on connections and click Open SQL Worksheet.

A SQL Worksheet will open. You can write your SQL and click on the Play button as shown below to execute the query. You can also use Ctrl-Enter as the shortcut, as in SQL Developer. The Query Result should be visible.

You can Count the number of records, Export, Copy and also use the Single Record View feature if you right click on the Query Results.

You can also Run scripts (or shortcut – F5 )using the button highlighted below.

To set Color Preferences, you can right click on the Worksheet and click on Command Palette and type preferences.

Click on Preferences: Color Theme and chose from the color themes available. Here, let me chose Abyss.

And there we are.

If you are a fan of SQLcl, like me and many others, you can right-click on connections and open up a SQL terminal.

This is a small intro to how you can use SQL Developer and SQLcl through VS Code. As I have mentioned earlier, the full functionality for SQL Developer would be available over time in VS Code. You can see the complete set of features available so far in the references provided below. And since SQL Developer will see it’s end-of-life at some point, it’s better to familiarize yourself with running SQL Developer extension in VS Code.

Happy learning!!!!

References

One comment

Leave a comment