EhBabay
EhBabay

Reputation: 149

How to connect to SQL developer using my own database

I'm currently using SQL Developer 4.5.1.21 and want to take some time to learn language, run queries etc etc. I'm using a database that Oracle provides called "HR Schema" that is free for download. Now I know that I need to create a "connection" in order run queries onto this database. I begin running into trouble when I want to create my own connection. Can anybody walk me through the steps of creating a new connection? What I do is click the "+" button and click "new connection".

Upvotes: 0

Views: 202

Answers (1)

gmiley
gmiley

Reputation: 6604

The major problem you have here is that you need to have an Oracle database instance installed before you can have something to connect to.

You have a couple of options here...

  1. Download and use the free version of Oracle: Oracle Express Edition

  2. You mentioned that you are a student. Check with your professor to see if they offer a more robust edition of Oracle for student use, such as:

    a. Oracle Personal Edition

    b. Oracle Standard Edition

    c. Oracle Enterprise Edition

  3. If you have the available funds, and you intend on persuing a future in database work, you could purchase a license of one of the above mentioned editions.

You can read more about the various editions of Oracle here.

One thing to keep in mind here is that you are wanting to use the sample schemas that Oracle provides, in particular the "HR" schema. Taking a look at the installation documentation over at the Oracle site, I do not see mention of the Express edition of Oracle server on the availability table, but that may not mean that it wont work.

To address the connection portion of your question, once you get your database set up and running, you should be able to connect to it by providing the hostname (localhost for connecting to your local machine), port, and various other information such as username and password. In all, your connection string would likely look like the following:

Host=localhost; SID=MyOracleServer; port=1677; Min Pool Size=1; Connection Lifetime=600; User ID=EhBabay; Password=secretpassword123;

Or within SQL Developer you should be able to connect to your local instance of the Oracle database fairly easily, without having to create a connection string. The connection string would still be used though, within any applications you write that you want to connect to the database with.

The main thing here, however is that you need to have an instance of an Oracle database installed and running somewhere that you have access to.

Upvotes: 1

Related Questions