I have Oracle SQL Developer Installed, Now What?

If you’re here because you downloaded a copy of Oracle SQL Developer and now you need help connecting to a database, then you’re in the right place.

I’ll show you what you need to get up and going so you can finish your homework, teach yourself Oracle database, or get ready for that job interview. You’ll need about 30 minutes to set everything up…and about 5 years to become proficient with Oracle 😉

Oracle Database come with SQL Developer but SQL Developer doesn’t include a database

But I’m here to talk to the folks that have downloaded SQL Developer and want to know what to do next.

You’ve got it running. You see this ‘Connection’ dialog, and…

Where am I connecting to, and who as?

You NEED a database

Installing SQL Developer does not give you a database. So you’re going to need to install Oracle and create a database, or connect to a database that is already up and running somewhere. Basically you need to know the following: where is this database, what’s it called, and what port is the listener running on?

Localhost is a network alias for 127.0.0.1 which is an IP address that maps to the ‘local’ machine, or the machine you are reading this blog post on.

The listener is a service that runs on the server and handles connections for the databases on that machine. You can run a database without a listener and you can run a listener without a database, but you can’t connect to a database on a different server unless both that database and listener are up and running. Each listener ‘listens’ on one or more ports, you need to know the port number for each connection. The default port is 1521, but 1522 is often pretty common.

I know all of this sounds very complicated

Oracle is a very sophisticated piece of software. It’s not analogous to downloading a mobile phone app and and using it 10 seconds later. It’s not like installing Office/Access either – it requires services, environment setup, kernel tweaks, etc.

However.

Normally an administrator will setup and install Oracle, create the database, and configure the listener for everyone else to use. They’ll often also setup the connection details for everyone via a ‘TNSNAMES.ORA’ file. This file contains a list of database connection details for folks to browse – kind of like an Oracle database phoneboook.

If someone has given you a TNSNAMES.ORA file, or setup your machine to have access to a TNSNAMES file, then you can just switch to the ‘TNS’ connection type, and use the dropdown to select the database you want to connect to. Then you don’t have to worry about the server names, database names, and the port numbers.

ORCL – that sounds promising! ORCL is the default SID when creating a new database with the Database Creation Assistant (DBCA).

You then ‘Start’ the image. It will boot a copy of Oracle Linux, start your database, and all that jazz. You can then start up and run SQL Developer inside the image OR you can connect to the database running on the image using the copy of SQL Developer you installed on your host machine.

Setup Port Forwarding to Make It Easy to Connect From Your Host

When you start the image, it will be assigned an IP address. Depending on what network adapter you select in the image preferences, you may get something that can get out to the internet from your image, something your host machine can see and connect to, or something that kind of just lives out there in a vacuum. You want to avoid the ‘vacuum’ option – unless you’re OK with running SQL Developer inside the Linux image.

Open the Virtual Box image properties and go to the Networking options. We’re going to setup port forwarding. This will tell your machine that anything that happens on port 1521 (the default Oracle Listener port), should just go to the image’s port 1521. So I can connect to ‘localhost’ and it will magically get transferred to the image that is running.

Oracle Virtual Box Port Forwarding 1521 listener database

Now You Just Need a Username and Password

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 passowrds are all ‘oracle’ too, so you can login as ‘root’ or as ‘oracle’ in the Linux desktop.

Connect!

Connect as HR to your Oracle database running on the OTN Developer Days Virtual Box image

If you’re connecting to someone else’s database, you need to ask the person that manages that environment to create for you an account. Don’t try to ‘guess’ or ‘figure out’ what the username and password is. Introduce yourself, explain your situation, and ask kindly for access.

This is your first test – can you connect?

I know it’s hard to get started with Oracle. There are however many things we offer to make this easier. You’ll need to do a bit of RTM first though. Once you know what’s required, you will be much more likely to succeed. Of course, if you need help, you know where to find me 🙂

Related Posts

Comments 164

Currently, we are using Toad but Quest starting being pain and charging us a lots of money so plan is dropping Toad . meanwhile, I am learning Oracle SQL developer. I am dba and was able to connect to one of my current databases in sql developer but when I try to connect to another one I do not see that database in the drop down Network Alias. Where is tnsnames location in sql developer so I can set it up. My tnsnames.ora file is under current path located in $ORACLE_HOME/network/admin. I have almost 30 databases there. The Network Alias only recognizes couple. Can you kindly advise.
I am interested learning about migration of Oracle objects from one schema to another, let say from DEVL to PROD and mostly Oracle securities in sql developer. Any tutorial on that?

sql dev looks in the same places that sqlplus will – it should def see it in your $ORACLE_HOME/network/admin directory. But, if it’s not, there’s a preference in SQLDev where you can manually specify the directory to look in.

A tip: Log into oracle.com and find the developer days download from there. If you try to download it from the blog post, the first step will be to log into oracle.com and your download will freeze on the log in page.

Hi Smith,
I have successfully imported an xml file into sqldeveloper which contains various databases. Now if i click to open any database it throws back me an error. i.e Vendor error (017176).
I have not installed any Oracle versions.
Kindly suggest way to proceed.

How do I solve this problem with my Oracle VM an SQL developer: Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
?

I followed the instructions as stated as was still unable to connect to the Developer Days Database. I downloaded SQL Developer to get me experience with Oracle as well as learning SQL.

I have been trying for several days but have not been able to successfully connect to a database to this point. I have a Mac, I am unsure if this would cause me any trouble. Part of the difficulty has come from finding resources that will instruct me on how to access the sample databases, whether they need to be downloaded or I need to enter a password for them.

Could you please provide me with any additional information that you feel may be more descriptive in downloading and connecting to a sample database?

Jeff
I’ve used SQL Developer before sometime ago.
Now, I’ve a Windows 10 client and I’m trying to connect after installing and I get this error below:
An error was encountered performing the requested operation:

IO Error: The Network Adapter could not establish the connection

Vendor code 17002
Apparently, it looks like there is a connection issue with my laptop.

I looked up the Windows 10 services, to see if I need to bring up the services by going to Control Panel > Admin Tools > Services.
Here I dont see any services related to Oracle such as Oracle.

Did you see the part in this story where I said that SQL Developer doesn’t include a database, and that you’ll need to provide your own? I also included a few options for making that happen with varying degrees of effort…

I downloaded sql developer on my mac. I downloaded virtual box as well and installed windows server 2012. I downloaded the databases from oracle website and installed them on the virtual box on windows server 2012. When i open sql developer and put in all the required information, i use the ip of the virtual box but i am still receiving the error “the network adapter cannot establish a connection” I NEED HELP PLEASE!! ive been at it for about 2 hours, went through so many videos still no luck.

I’m suggesting you read the post you commented on, in particular this bit:

It’s just me, and I need help!

No administrator, no database, no nothing. What do you do?

You have a few options:

+ Buy a copy of Oracle and download, install, and create a database
+ Download and install XE (FREE!)
+ Download, import, and run our Developer Days Hands-on-Lab (FREE!)
If you’re a student (or anyone else) with little to no experience with Oracle, then I recommend the third option.

It’s a VM that already has linux and Oracle 12c going on it. You just download it, import it to VirtualBox, and hit ‘start’ – then you’re up and running.

You don’t have a tnsnames.ora file unless you make one or unless someone gave you one? Are either of these true? If so, point to the directory where that file is in your preferences, on the database page.

I tried connecting my Oracle 11.2.0.1.0 database instance using sys as sysdba role selected but failed on sqldeveloper with ORA-01017 However i was able to connect to sys user using sqlplus terminal using same password.

Using command client console using sys user, I tried to create another user with granted CONNECT role on the same database and this user is able to connect successfully using sqldeveloper.

Earlier, I had been using Oracle XE instance on SQLDeveloper and was successful to connect to XE instance using sys user

I would like to know what could be a reason for such a behavior on SQLDeveloper.

i had install the sql developer but when i try to click on button’test’to create connexion,a msg appears:Error I/O:the network adapter could not establish the connection.I try to start oracle listener on windows tasks,but i didn’t find any service refers to oracle.

I installed an SQL developer, but I don’t have a database to connect to. I really only want to practice my skills. Is there any databases out there I can connect to in order to just practice query writing?