Oracle Connection Help
Listed below are connection examples for three common JDBC drivers for Oracle:
Oracle Thin JDBC Driver
In order to use the Oracle thin driver, the jar or zip file containing the Oracle thin driver must be obtained.
Oracle provides this download free of charge, but may require you to register on the Oracle site to proceed with
the download.
The Oracle thin Driver is also usually included in the Oracle client installation. If you have the Oracle client installation
on your machine, the location of the thin drivers should be in the classes12.zip file or the ojdbc14.jar file for
newer Oracle versions. Consult the documentation from Oracle for details.
DRIVER CLASS: oracle.jdbc.driver.OracleDriver
DRIVER LOCATION: Simply specify the location of the jar or zip file that contains the Oracle Thin drivers.
JDBC URL FORMAT: jdbc:oracle:thin:@<host>:<port>:<SID>
NOTE: The Oracle thin driver requires the SID of the database in the JDBC URL as opposed to the database alias.
Consult your Oracle documentation for more details.
JDBC URL Examples:
jdbc:oracle:thin:neptune.acme.com:1521:T10A
jdbc:oracle:thin:127.0.0.1:1521:T10A
Oracle 8i OCI JDBC Driver
DRIVER CLASS: oracle.jdbc.driver.OracleDriver
DRIVER LOCATION: In order to use the Oracle OCI drivers, a Oracle client installation is usually required on
your machine. If using the OCI drivers, you must supply the jar or zip file located in the Oracle client directory
path to connect to the database. The OCI drivers are usually contained in the classes12.zip file.
JDBC URL FORMAT: jdbc:oracle:oci8:@<database_name>
JDBC URL Examples:
jdbc:oracle:oci8:TEST
Oracle OCI JDBC Driver
DRIVER CLASS: oracle.jdbc.driver.OracleDriver
DRIVER LOCATION: In order to use the Oracle OCI drivers, a Oracle client installation is usually required on
your machine. If using the OCI drivers, you must supply the jar or zip file located in the Oracle client directory
path to connect to the database. The OCI drivers are usually contained in the classes12.zip file
or the ojdbc14.jar file for new Oracle versions.
JDBC URL FORMAT: jdbc:oracle:oci:@<database_name>
JDBC URL Examples:
jdbc:oracle:oci:TEST
|
|