Oracle SQL Developer Extension for VS Code

This quick, step-by-step guide shows how easy it is to connect to an Oracle Cloud Database from VS Code. It covers the basics; subsequent articles will explore more advanced features. For full details, see the official extension documentation here.
Installing the Extension
The first step, obviously, is to install the extension. And it is pretty easy. Go to Extensions tab of VS Code and search for “Oracle SQL Developer Extension for VSCode” and install it.
Press enter or click to view image in full size
Create Connection
The next step is to create the connection to a DB. You can choose between various connection options. I will be showing how to use the Cloud Wallet option.
Press enter or click to view image in full size
Click on Create Connection and you will be prompted to provide the details as shown above.
Configure Connection Settings and Cloud Wallet
Confguring the connection setting is simple and straightforward. Here are the steps involved.
Download the wallet from OCI console
Change the Connection type to “Cloud Wallet”
Click on “Choose File” and select the Wallet Zip file
Select the Service (this will be available after you select the Wallet zip file)
Press enter or click to view image in full size
Make sure to alos provide the following:
Connection Name
Username
Password
Optionally choose to save password
Press enter or click to view image in full size
Click the “Test” button to make sure you are able to connect to your database. You should see a success message in the bottom right corner of VSCode.
Once connected you will notice the Database in the left panel.
Create a new SQL Worksheet
To the right of the connection name, you will notice few options. One of them is Open the SQL Worksheet and this is where you will write and execute your SQL statements.
Press enter or click to view image in full size
You can also use the keyword Ctrl + Shift + W to create a new SQL Worksheet.
SQL Worksheet Features
Autocomplete is enabled and available. When you start typing the object name, you will notice the objects with similar names available for easy selection. This definitely speeds up the development time.
Press enter or click to view image in full size
Once you execute the statement, you will notice the restults at the bottom (just like SQL Developer). Ctrl + Enter keyboard shortcut works to execute SQL statement.
Press enter or click to view image in full size
One of the best features I like is the SQL History tab. This allows you to view SQL statements executed previously. Double clicking on one of the history record will copy that statement to the editor.
Conclusion
Oralce has made is extremely easy for you to connect to your Oracle Cloud DBs. And as many of us uses VS Code, it is now even more easier to use the same editor with Oracle DB. You get to use the same Code Editor for all your programming needs.



