Creating a Database Connection Using SQL Developer

A database connection is a SQL Developer object that specifies the necessary information for connecting to a specific database as a specific user of that database. You must have at least one database connection (existing, created, or imported) to use SQL Developer.

To create a database connection:

  1. In the Connections navigator in SQL Developer, right-click the Connections node and select New Connection.

    The New / Select Database Connection dialog box appears, with the Oracle tab displayed.

  2. Enter the following information:
    • In the Connection Name field, enter the name to use for this database connection.

    • In the Username field, enter the name of the user for whom this database connection is being created.

    • In the Password field, enter the password for the user.

    • In the Connection Type field, select the database connection type.

      The connection types are:

      • Basic

      • TNS

      • LDAP

      • Advanced

      • Local/Bequeath

      When you choose a connection type, the fields below will change to be appropriate for the selected connection type. This example describes the fields for the Basic connection type.

    • In the Role field, select Default or SYSDBA, based on the role assigned to the user.

    • In the Hostname field, enter the name of the host where the database is located.

    • In the Port field, enter the port for the database.

    • In the SID field, enter the SID for the database (when the database connection is for a non-CDB user or for a multitenant container database (CDB) user):

      When a database connection to a non-CDB or CDB is created for an administrative user such as SYS, SYSDBA is typically specified in the Role field for the connection.

    • In the Service name field, enter the service name for the pluggable database (PDB), including the domain name (when the database connection is for a PDB user):

      When a database connection to a PDB is created for an administrative user such as SYS, SYSDBA is typically specified in the Role field for the connection.

  3. Optionally, click Test to test that the data you provided will allow the specified user to connect to the database.
  4. When you are finished, click Connect to connect using the database connection, or click Save to save the database creation.

See Also:

  • Oracle SQL Developer User's Guide for more information about creating, editing, exporting, and importing database connections.

  • Oracle Database Concepts for an overview of the multitenant architecture introduced in Oracle Database 12c, which enables an Oracle database to function as a multitenant container database (CDB) that includes zero, one, or many customer created pluggable databases (PDBs). A non-CDB is a traditional Oracle database that cannot contain PDBs. All Oracle databases before Oracle Database 12c were non-CDBs.

  • Oracle Database Administrator's Guide for complete information about creating and configuring a CDB.