Creating a new database and new connection in Oracle SQL Developer

178,721

Solution 1

This tutorial should help you:

Getting Started with Oracle SQL Developer

See the prerequisites:

  1. Install Oracle SQL Developer. You already have it.
  2. Install the Oracle Database. Download available here.
  3. Unlock the HR user. Login to SQL*Plus as the SYS user and execute the following command:

    alter user hr identified by hr account unlock;

  4. Download and unzip the sqldev_mngdb.zip file that contains all the files you need to perform this tutorial.


Another version from May 2011: Getting Started with Oracle SQL Developer


For more info check this related question:

How to create a new database after initally installing oracle database 11g Express Edition?

Solution 2

  1. Connect to sys.

  2. Give your password for sys.

  3. Unlock hr user by running following query:

    alter user hr identified by hr account unlock;

  4. Then, Click on new connection

  5. Give connection name as HR_ORCL

    Username: hr

    Password: hr

    Connection Type: Basic

    Role: default

    Hostname: localhost

    Port: 1521

    SID: xe

  6. Click on test and Connect

Solution 3

Open Oracle SQLDeveloper

Right click on connection tab and select new connection

Enter HR_ORCL in connection name and HR for the username and password.

Specify localhost for your Hostname and enter ORCL for the SID.

Click Test.

The status of the connection Test Successfully.

The connection was not saved however click on Save button to save the connection. And then click on Connect button to connect your database.

The connection is saved and you see the connection list.

Share:
178,721

Related videos on Youtube

MontyPython
Author by

MontyPython

Updated on July 09, 2022

Comments

  • MontyPython
    MontyPython almost 2 years

    I've installed SQL Developer on my system. No connections are being shown in my system yet. How do I create a new connection. Must I create a database first? If yes, then how do I create a new database. The SQL Query Editor window is not opening because there is no connection. All of this because there is no database. How do I create an empty database and then connect to it.

    • Leniel Maccaferri
      Leniel Maccaferri almost 11 years
      Did you install Oracle database first?
    • MontyPython
      MontyPython almost 11 years
      No. How to do it. I didn't get it from the documentation.
  • lnman
    lnman about 7 years
    Please don't provide duplicate answer.
  • MontyPython
    MontyPython over 6 years
    @SachinKainth - Installing MySQL is such a relief!
  • Philip Rego
    Philip Rego over 6 years
    'alter' is not recognized as an internal or external command, operable program or batch file.
  • Mike
    Mike over 5 years
    Username and password are upper case HR
  • alelom
    alelom over 3 years
    Copy-pasting from the documentation is not an answer.