Connecting to Oracle Database XE

See Also

You can establish a connection to Oracle Database from the NetBeans IDE. For example, you can use Oracle Database 10g Express Edition (Oracle Database XE), a lightweight database that is free to develop, deploy, and distribute.

Before connecting to Oracle Database, ensure that you have downloaded the JDBC driver for the database. The recommended driver is ojdbc6.jar. For more information about Oracle JDBC drivers, refer to the Oracle JDBC information:

To connect to the Oracle Database XE from the IDE:

  1. In the Services window, right-click the Databases node and choose New Connection.
  2. In the Locate Driver step of the New Connection wizard, choose one of the following drivers for Oracle Database:
  3. Click Add to specify the location of the ojdbc6.jar file. This file contains packages for both types of Oracle DB drivers. However, if you want to use the OCI driver, you also need to have Oracle Instant Client installed on your machine. Click Next.
  4. In the Customize Connection dialog box of the New Connection wizard, choose the driver name and how you want to specify the database: by a SID name (Oracle System ID), Service Name, or a TNS name.
  5. Then, enter the hostname or IP address to which you want to connect. If you are connecting to a locally installed database instance, enter localhost or 127.0.0.1.
  6. Provide the port number. The default port is 1521.
  7. Depending on your choice of the driver, enter either the SID name, Service, or TNS name.
    For example, the default SID for Oracle Database XE is XE.
  8. Provide the database user name and password.
  9. (Optional) Click Test Connection to see if the connection can be established.
  10. Click OK. The IDE displays the connection to the database under the Databases node in the Services window.

For more information on how to connect to Oracle Database from the NetBeans IDE, see:

Notes:

See Also
Connecting to a Database

Legal Notices