Just a quick tip if you need to reconfigure an Oracle database connection for use in Oracle’s SQL Developer.
I recently had to reinstall Windows on my computer, and sighed heavily when I realised that meant I also had to reconfigure the connection to an Oracle database I use. That meant installing XEClient, creating a tnsnames.ora file in the right location, and adding the service connection.
But it only took me a couple of minutes to search the Internet for an easier solution that required only setting up a connection string in SQL Developer and be done with it.
In SQL Developer, you can connect in several different ways, and one of them is ‘advanced’. When you select that, you get only one textbox in which you can form a JDBC URL. This is how it should look like:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip-address or hostname>)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service-name>)))
Aaand done. Wish I figured this out sooner, instead of messing around with the infamous tnsnames.ora file.