I Installed Oracle SQL Developer, Now What?
By: Jeff Smith
Tags: Oracle Database, Sql, Developer Tools, Developer

You did it! You landed the big interview*. Tomorrow is the big day. There’s just one problem: they expect you to know what a database looks like, and how to write SQL.

No worries, you tell yourself, I’ll just go download that Oracle thing and have a go at it.

Ok, point-click, go sounds good, let’s go get that thing.

Oracle SQL Developer is the GUI, and you’ve downloaded and got it up and running in five minutes. Awesome. Let’s do this.

Crap. Userame? Password?? Hostname??? What the what?

You’re being asked for a few things that you don’t know. And to be honest, you don’t even know what you don’t know.

SQL Developer is a desktop application. It serves as a client for working with an Oracle database.

But, it’s NOT a database, nor does it come with one.

And you’re going to need a database.

So, you could go make yourself a database.

But (a really BIG but)

Starting out day 1 of your Oracle journey by installing the Oracle Database software and creating a database is going to be a tough ask for most people. And let’s remember, you have that interview TOMORROW, so let’s not spend the next 4 hours going through that process.

Let’s get to the goods, NOW.

I’m not MOST people, I’m fairly decent at this IT stuff.

UNIX, Linux, OS X, whatever.

Comfortable with Docker as well? Yes? Excellent. Go download Oracle XE for Linux. It’s free! Then get this container.

Once you have the container up and running, you can connect to the database inside of it from SQL Developer. And the connection properties in SQL Developer default to you having XE running on your machine: the servername is localhost and the database name is ‘xe.’

If you’re NOT a Linux/Docker aficionado, you can also download the Windows version. There’s a GUI installer. It won’t take you very long to get it up and running.

But then you’re going to have a database to maintain on your machine, and a a BUNCH of software to install.

Probably overkill for what you need.

Easy++ — Just download & use our VirtualBox appliance.

We built a virtual machine, completely free to use for learning Oracle, that you can simply:

download

import

run

You need to download and install VirtualBox, also free.

Download the appliance (fancy way of saying image).

The image includes:

12cR2 Enterprise Edition copy of Oracle Database (with sample data!)

SQL Developer installed and ready to connect

Some browser based labs you can step through to learn Oracle

Oracle Application Express, in case you want to build a web application

Import the Appliance

After you’ve installed VirtualBox, run it.

After you’ve downloaded the appliance from Oracle, use the ‘Import’ option in VirtualBox and point to that file.

It’s that REALLY big file you just downloaded.

This will bring up another dialog with some switches and settings you can change. Just click OK.

It will take a few minutes to put the files down. When it’s done, you can safely delete the .ova file you downloaded.

You should see your image in the VirtualBox app, select it, and hit the ‘Start’ button on the toolbar.

You’re cooking with gas when you see this on your desktop:

YOU ARE SO CLOSE NOW.

You CAN run SQL Developer inside the image, but don’t. Save the image resources for the database and linux OS. You can easily run SQL Developer on your host desktop and connect to the database inside the image.

Now We’re Ready to Connect!

Let’s create a connection.

Pay attention to this part.

Connection Name: anything you want

Username: we’re going to use ‘HR’

Password: ‘oracle’ — yes, it’s case sensitive

Hostname: localhost

Port: 1521

Service name: orcl

The VirtualBox appliance has a port forward setup. It allows you to ‘talk’ to port 1521 on your machine, and it’s setup to send that traffic to port 1521 on the Linux image. That’s why we can use ‘localhost’ for the server, instead of having to worry about what the IP address or network name for the image is.

Fill out the boxes, and hit ‘connect.’

The default passwords on this image are all ‘oracle’ — so you can connect as SYS, HR, or whatever — just use ‘oracle’ as the password. The Linux passwords are all ‘oracle’ too, so you can login as ‘root’ or as ‘oracle’ in the Linux desktop.

You can type SQL in the Worksheet, or you can ‘draw’ queries in the Query Builder.

You’re in! Now you can start trying to learn and use the database without reading the docs. That’s how we all do things right? We unwrap the package, install the batteries, and turn it on. It’s only after we get stuck on our third or 10th try do we resort to reading the instructions.

When you’re ready to read those instructions, go back to the Linux desktop in your VirtualBox appliance.

Find the big red ‘start here’ button. It’s actually a button. Double-click it. Or right-click, ‘Open.’ That will launch our free tutorials.

I recommend you start with ‘SQL Developer.’

These are step-by-step instructions complete with screenshots so it’s easy for you to follow along.

Good luck on that interview tomorrow!

After you nail the interview and get the job, your journey will continue. We have lots of resources for you. I’m on Twitter and have a blog where I talk about SQL Developer…a LOT.

If you prefer moving pictures, we also have a YouTube playlist that you can peruse at your leisure.

Maybe it’s not an interview. Maybe it’s that database class you signed up for, and you waited until the last moment to start your homework.

A version of this story originally published at thatjeffsmith.com on Dec 4, 2012.