Showing posts with label JDBC. Show all posts
Showing posts with label JDBC. Show all posts

Wednesday, June 2, 2010

JDBC Oracle Connect String

What are Oracle JDBC drivers ? [Using Service Name instead of SID]

JDBC is an API that allows Java programs to access any tabular data source.
In order to interact with an Oracle Database from a Java program using JDBC interface,
Oracle provides its own Oracle JDBC drivers.
Oracle provides drivers that enable users to make JDBC connections to Oracle databases.
The two most common methods of connecting to Oracle databases via JDBC are the Oracle Thin JDBC driver and the Oracle OCI JDBC driver.
The Oracle Thin driver requires no software other than the driver jar file. This driver connects to Oracle databases via TCP/IP.
The Oracle OCI (Oracle Call Interface) driver requires Oracle client software to be installed on the user's machine in order to connect to the database.
This driver uses native methods and is platform specific.
The Java classes to connect to Oracle are contained in the Oracle JDBC driver jar file.
For recent releases, these are numbered based on the Java version they are compiled for,
such as ojdbc14.jar (for Java 1.4), ojdbc15.jar (for Java 1.5), etc.
These drivers can be freely downloaded from Oracle's site (free registration is required).
You can tell the Oracle driver which method you wish to use to connect to the database (OCI or Thin) via the JDBC connection URL.

Oracle supplies 4 JDBC driver types

    JDBC Thin client-side driver (Thin driver) JDBC OCI client-side driver (OCI driver) JDBC server-side Internal driver (KPRB driver) JDBC Thin server-side driver