Wednesday 26 August 2020

The Oracle DB Developer VM: Installing SQLDeveloper

This post is part of my Oracle DB Developers VM series. Based on the previous postings on how to set up Oracle Linux 8 with the Oracle DB on VirtualBox, this post will show how to install the Oracle SQLDeveloper 20.2 in this environment on a beginners level.
Download the latest SQLDeveloper from Oracle. I recommend downloading it from your host OS and put it in some directory that is accessible from your VM. I use the version for 'Other platforms', which is not platform specific.
Extract it to the ~/bin directory in your home, next to your sqlcl folder. Start it with

~/bin/sqldeveloper/sqldeveloper.sh

After startup you are immediately prompted to connect to one of your databases.
Choose the one you want ...
... and enter your credentials
It will appear on the left in the Connections-tree and is immediately available for using.
Also add the PDB to your connection list.
You can either select the ORCLPDB entry from the Welcome Page or right-click on Oracle Connections, choose New Connection and fill out the dialog. To make sure that everything is correct, click Test before Connect.

Now for some convenience, and again here is where Gnome 3 gets more in my way than helping me. Create the file /home/oracle/.local/share/applications/sqldeveloper.desktop with an editor and insert the following

[Desktop Entry]
Type=Application
Name=SQLDeveloper
Comment=Oracle SQLDeveloper
Icon=/home/oracle/bin/sqldeveloper/sqldeveloper/doc/icon.png
Exec=/home/oracle/bin/sqldeveloper/sqldeveloper.sh
Terminal=false
Categories=Development;Programming

Then completely restart the VM as it seems that Gnome only loads this files on startup.
Now Gnome finds SQLDeveloper in it's Activities ...
... and also in the Applications Menu under Programming.

And again, you can use the same archive to also run SQLDeveloper on your host OS.
Just unzip the archive to any directory. In my case on Windows I copy the sqldeveloper folder from the zip to D:\Oracle and pin the sqldeveloper.exe to the Taskbar.
SQLDeveloper found my previous connectsions and also offers me to import the new ones from tnsnames.ora, as in my VM.

So with SQLcl and SQLDeveloper we have the basic tools every DB developer needs ready to use in both our VM and the host OS.