I am completely new to Oracle with basic sql plus knowledge. I have installed Oracle 10g Release 2 and java 1.6 .
All i want to do is to connect Oracle with Java so that i can send queries and retrieve results. I found that we need a jdbc driver
and a odbc driver for connecting. How can i get them and how to install ? Or should i use another type of driver ?
Does Oracle have a server ?if yes , should I use it for accessing the database?
Daniel William wrote:
Does Oracle have a server ?if yes , should I use it for accessing the database? Can someone explain?
What kind of server do you expect? Do you mean a bundled application server with 10gR2 database setup? Please state it clearly. But in order to connect to database within your java code you don't need any server. Just have your database and tns listener running and follow any jdbc tutorial if necessary. This might be helpful for oracle specific how-to's : JDBC How-To Documents
its because i have used it in our lab session. i didnt have this difficulty of installing ,as it was set and configured by our admin.
i also did all programs using this driver set.
so to switch to thin driver i need learn about its syntax in java.
now whats the use of thin driver ? is it the right one for simple java programs?
To turn your question on its head: what is the use of the JDBC-ODBC bridge? It is (by Sun's own admission) not what you would call a first choice for JDBC. If there is a vendor specific equivalent is is much easier to just use that.
The Orcale thin driver is a type 4 driver, so you need no extra configuration. I would always use it when working with Oracle.