Java on oracle - How does one connect with the JDBC OCI
Driver? - Feb 28, 2009 at 18:10 pm by Vidya Sagar
How does one connect with the JDBC OCI Driver?
The Oracle OCI driver uses Oracle Call Interface in order to communicate with
the database. The following is the connection process for JDBC OCI Driver.
ORACLE_HOME : This is the folder in which Oracle database has been installed.
For example D:\oracle9i [windows], /home/oracle/orahome [Linux / Unix]. This
folder will have sub-folders such as bin, sqlj, network, rdbms, jdbc, jlib,
lib, etc…
To connect Oracle OCI drivers in Windows:
1. Set ORACLE_HOME environment variable
2. Add ORACLE_HOME\lib to System PATH
3. Set CLASSPATH environment variable to use Oracle JDBC driver from
ORACLE_HOME\jdbc\lib
4. Specify the required URL to get the connection in the JDBC application.
To connect Oracle OCI drivers in Linux / Unix
1. Set ORACLE_HOME environment variable
2. Add ORACLE_HOME/lib to LD_LIBRARY_PATH environmental variable
3. Set CLASSPATH environment variable to use Oracle JDBC driver from
ORACLE_HOME/jdbc/lib.
4. Specify the required URL to get the connection in the JDBC
application.
|