Room of a pleinolijf

Ask yourself this: how do I want to be remembered ?

Connecting Oracle SQL Developer to database without tnsnames.ora

4 Comments

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.

Advertisements

Author: pleinolijf

father | volleyballer | software engineer

4 thoughts on “Connecting Oracle SQL Developer to database without tnsnames.ora

  1. You can go even faster than that – just use the Basic connect dialog, type in your server name/ip, listener port, SID/service, user and password string and you’re good to go.

    Same idea as the JDBC advanced, just no syntax to remember.

    Like

  2. No worries, I also HATE maintaining my TNS entries 🙂

    Like

  3. Ahh! But none of it seems to apply to the SQL Developer v4.1.3.20. The tools menu is still there, but “preferences” is no longer an option.

    It’s even more discouraging that I’m trying to connect to an Amazon Web Services RDS (Relational Database System)

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s