Oracle Database 11g JDBC Drivers - So many files ??? What do they mean? - jdbc

I wanted to use Oracle 11g as my db for java code. I tried to get the drivers from the oracle website.
I saw so many files with some jargon thrown in here and there. I need to know what those words mean and how they affect me as a user. How do I decide which one to use ? I picked ojdbc6.jar because I use jdk 6. Please help me to understand what the descriptions of the file mean and who should be concerned about them and why ?
ojdbc6.jar - Classes for use with JDK 1.6. It contains
the JDBC driver classes except classes for NLS support in
Oracle Object and Collection types.
ojdbc6_g.jar - Same as ojdbc6.jar except compiled
with "javac -g" and contains tracing code.
ojdbc6dms.jar - Same as ojdbc6.jar, except
that it contains instrumentation to support DMS
and limited java.util.logging calls.
orai18n.jar - NLS classes for use with JDK 1.5, and
1.6. It contains classes for NLS support in Oracle
Object and Collection types. This jar file replaces
the old nls_charset jar/zip files.
xdb6.jar - To use the standard JDBC4.0 java.sql.SQLXML
interface with JDBC 11.2.0.3, you need to use xdb6.jar
(instead of xdb.jar) from the 11.2.0.3 distribution.
EDIT -
Btw, what is the SimpleFan.jar for ? I saw that too.
Thanks.

Sounds like you picked the right one.
The "_g" one would be needed if you needed to step through the Oracle JDBC code, which is unlikely.
The "dms" version supports fancier monitoring of the db. Again, not something you'd typically use.
"orai18n.jar" would be needed if you wanted to go whole hog with internationalization support.
xdb6.jar would be needed if you wanted to make use of SQLXML to store and process XML documents within the database.
The good news is ... if at any point you realize you do need any of these extra capabilities you can just swap out the jar and be on your way!

Related

Can I connect to Oracle database without Oracle JDBC driver?

TL;DR:
Is there a way to connect to an Oracle DB via JDBC without the Oracle JDBC driver? Or any other way (e.g. hibernate)?
Full story:
We have an existing Spring Boot app, which connects to an Oracle 11c database instance using OJDBC driver. Spring Boot internally uses JdbcTemplate to execute a few inserts and selects, basically 5 or 6 type of statements. Technically it is working fine.
However we are in an interesting situation, the code we built has to pass through a series of checks (we are working as subcontractors under a larger international company), and part of these checks is a license inspection. BlackDuck (https://www.blackducksoftware.com) is used to report every single library which is linked in the solution (around 280 in our case), and we had to manually add the copyright statement to each (for example: "Copyright © 2005-2019 The Apache Software Foundation. All Rights Reserved."). We added the Oracle Technology Network license to the Oracle Driver, and it was rejected by the legal team of the international company:
"Unless we are actually licensed to use an Oracle database (which you are not), we cannot allow the use and distribution of the Oracle JDBC drivers. Those drivers are licensed under the Oracle Technology network license and it obligates XXX [company name] to designate Oracle as a 3rd party beneficiary, which is not something our legal department allows. You must therefore find a compatible replacement that is licensed under open source."
Now, we are obviously trying to get around this thing (seeing as the end client who is receiving the solution has a licensed Oracle DB installed, and we can see earlier versions of the OJDBC driver in the company's Nexus repository), but I wanted to ask, is there a way to connect to an Oracle DB via JDBC without the Oracle JDBC driver? Or any other way (e.g. hibernate)? To my knowledge, Oracle DB communication protocol is not fully standard, that's why you need the Oracle drivers. Is there an open source alternative that I don't know of?
Oracle DB communication protocol is not only "not fully standard", there is simply no SQL or JDBC standard for any on-the-wire communication protocol for SQL databases, they are all proprietary.
There is no open-source alternative that I'm aware of, and there couldn't be without Oracle's help as the protocol is not publicly specified as far as I know. We solved a similar problem by having our customers with an Oracle license add the driver to their deployment of our app, that way we didn't redistribute it, and they were the ones who used it.
Yes, use someone else's driver. Progress makes one for example.
I'm not speaking on behalf of Oracle in terms of the quality of THIS driver or the legal terms concerning your decision to not use our driver. However, there are alternatives to our driver for Java applications, and this is one of them.

What is meant by vendor database library in jdbc concept?

I am learning about JDBC. When I am learning about it, I have come to known we can use 4 drivers. In each of these architecture I find the vendor database libraries in jdbc-odbc bridge driver and also native API calls in other type 3, 4.
I am unable to know about those concepts in the architecture.
So I request anyone to say about those two concepts which deals with the JDBC drivers.
I have referred the below link :
http://www.javatpoint.com/jdbc-driver
Vendor based database libraries means you need to use libraries provided by vendors to connect to database.
For example
You need to use ojdbc6.jar for Oracle , postgresql-9.4.1207.jar for postgresql etc.
Short answer: database is called a vendor database if you interact with it through JDBC using special drivers.
JDBC is an API, which allows you to work with different databases (such as MySQL, PostgreSQL etc.) using the same methods to query and update data in a database. This happens by using special drivers, which are unique for every database. In this case the database you are working with is called a vendor database.

Oracle Driver vs JDBC vs. close implementation

We have an external server service running Oracle and we can not access his configuration. We have the code for the application and we are interested in the current implementation of connection.close().
So the question is, running a Oracle 12c database, is it possible to connect to the database using older database driver version such as Oracle 11g? We want to exclude a simple configuration problem by drivers not matching the database product version.
Is there any document (other than JavaDoc) that specificates the implementation behaviour of Connection.close() since the Java spec says its implementation depending and there is no general rule.
If you have Metalink access, you can check MOS note 207303.1 on Client-server interoperability.
In summary, Clients 11.2.0 and above are fully supported; 11.1.0 is supported, but bugfixes are possible only for customers with Extended support.

Does JDBC driver need to be upgraded when updating database version (IBM DB2 9.7)?

We will upgrade out IBM DB2 9.7 LUW to 10.5 LUW. Do we have to upgrade our JDBC driver too, or can we use existing one from 9.7?
Normally you should, in order to have everything at the same level. Each release has an upgrade in the JDBC drivers. You can check this page to see the different JDBC versions: http://www-01.ibm.com/support/docview.wss?uid=swg21363866
In addition, you can check the list of APARs to check if you must change it because of an error. To see the list of enhancements in each version please visit the following link and look for the JDBC section of each fixpack: http://www-01.ibm.com/support/docview.wss?uid=swg21633303
IMO, it depends. I'd check to see if the newer driver includes support for additional features that I want to make available to my application. If you don't need any of the new functionality the motivation to change the driver is reduced. If you have already been using the older driver with your app with no issues then you probably are not affected by any defects that are fixed in the newer driver. Keeping the same driver in place might reduce the QA you have to do as a result of upgrading the database. It would also mean you would not have to push a new driver out to all of your clients. You already know the driver you are currently using plays nicely with your app so by keeping it you can minimize the variables in the upgrade.
The protocols between the two databases are the same with the exception of new functionality added to 10.5. I can't really speak for what IBM supports in this regard but we (DataDirect) support multiple version of the database from one version of the driver. I suspect the same is true with the IBM driver. If you are curious to see how we handle it, we have a support matrix, that shows what versions of the database our current JDBC driver supports.

Oracle database - use external Java

I'm looking to find a way how to use higher versions of Java (1.6,1.7,...) instead of Java 1.4 which is available for Java stored procedures in a Oracle 10g.
I'm thinking about deploying a GlassFish server on the database server, and deploy web applications which functionalities would I use by calling them from PL/SQL.
Reasons for using Java instead of PL/SQL would be communications with various devices, calling and deploying web services, text processing...
Does anybody have a better, simpler idea on how to use higher version Java from PL/SQL in Oracle 10g database?
Forget about that. There used to be something called Jserver several years ago, but it was abandoned by Oracle. Theoretically you could use Oracle ver 12c which uses JVM ver 1.6. But even this JVM is slightly different. For example it's GC can kill threads when they are not bound to a "live" DB connection. So you may encounter various interesting problems.
There is no way how to "upgrade" JVM inside current Oracle DB installation.

Resources