Can I connect to Oracle database without Oracle JDBC driver? - oracle

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.

Related

What are the supported clients and client versions for Autonomous Database?

What are the supported clients and client versions for Oracle Autonomous Database?
Any connection type supported by Oracle Net Services can be used to connect to Autonomous Database.
Oracle Call Interface (OCI) connections require installing the Oracle client software. For these connections, Oracle Database Client 11.2.0.4 (or higher) or the Oracle Instant Client 12.1.0.2 (or higher) are supported by Autonomous Database.
For JDBC Thin connections, the only requirement is to have JDK8 (or higher) installed.
You can also connect to Autonomous Database using the Oracle supplied tools such as Oracle SQL Developer (version 18.2 or higher recommended)and Oracle SQLcl.
Some of these clients and tools such as JDBC, SQL Developer, and SQlcl support TLS authentication without using any wallet; hence making life much easier as opposed to mTLS authentication, which requires a wallet. I definitely recommend checking out the TLS option without a wallet in ADB since it has several advantages as described in this blog post.
Another great option is Oracle Database Actions if you don't want to worry about supported versions, installing a client, whether to use a wallet or not. Database Actions is a web-based interface that uses Oracle REST Data Services to provide executing your SQL statements and scripts, creating Data Modeler diagrams, developing RESTful web services, managing JSON collections, and using the Data Load, Catalog, Data Insights, Business Models, and Data Transforms tools to load data from local and remote sources, view data in your tables and views, view objects in your data dictionary, and organize, analyze, and transform your data. You can access Database Actions from the ADB details page of your instance in Oracle Cloud Infrastructure console:
I also recommend referring to the documentation for more details on supported clients, client versions, and connection methods.
Disclaimer: I’m a Product Manager at Oracle.

Database note taker Oracle db

I'm trying to find a tool that will help me to build a documentation for a database.
I need to write comment on column / table and to have a summary of data flow that creates/modifies data and most important, at a conceptual level what data means. I'm also looking for a free tool
After a long search, I found out http://databasenotetaker.com/ which seems to be suitable for my purposes.
My database is Oracle.
From the documentation they say it potentially support every database but I can't connect to Oracle.
I don't know how to specify the driver in the connection window:
According to their documentation
**
Can Database Note Taker connect to other database platforms?
**
Yes and we will add support for other platforms in the future. So long as it's a relational database and there are freely available connectors, then Database Note Taker will be able to work with it. Out of the box you can connect to Microsoft Sql Server, and MySql via ODBC."
Out of the box you can't connect to Oracle, therefore you need a driver. Check with them to understand which driver they mean when they said "freely available connectors". Out-of-the-box in this context refers to the drivers that appear in the selection list.
My advice: Ask them which kind of driver do you need. If standard ODBC is ok, you must download the ODBC driver from Oracle.
https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
Important Check whether this product supports 64 bits or it is 32, in order to select the right ODBC driver.

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.

Connecting to different database versions

I maintain a set of applications that use Pro*C to connect to Oracle 10g databases. These applications are generally involved with moving data from one database to another. In each case a connection is made to the source database and a separate connection is made to the target database. For reasons that are out of my control the target databases are to be upgraded to 11g whilst the source databases are not. I have searched the internet unsuccessfully, well I have posed the problem as many different ways as I can think of in google, in order to determine whether connecting to different versions of the database is acceptable .The only, almost relevant, documentation I can find is this Can anyone point me to any other documentation that would allay my clients fears?
The official client/ server compatibility matrix for Oracle is My Oracle Support 207303.1 "Client/ Server/ Interoperability Support Between Different Oracle Versions". That is probably the documentation that your clients would want to see.
The quick version is that if your application were to use, say, the 10.2 Oracle client, you would be able to connect to databases from 9.2.0.4 to 11.2.0.x. If your application were to use the 9.2 Oracle client, you'd be able to connect to databases from 8.1.7.x to 11.2.0.x. If you used an earlier version of the Oracle client, you would not be able to connect to an 11.1 or an 11.2 database.

What is an Oracle Client?

I'm from MySQL background and am new to Oracle. I want to know
What is meant by Oracle Client?
What is its use?
What is its equivalent in MySQL ?
Thanks
What is meant by Oracle Client?
and
What is its use?
In this context, a client is a class library (DLL) that allows you to connect remotely to the underlying database of an application. A client, always within the same context, can also be called a .NET Data Provider.
You may have multiple data providers based on the underlying database engine with which you're working.
There was System.Data.OracleClient (deprecated), provided by Microsoft.
There is Oracle.Data.Client, which is actually the best ever built Oracle Client, or Oracle .NET Data Provider. You may also download the latest Oracle 11g Data Provider for .NET.
So, when accessing the Oracle underlying database, make sure your work with this provider, proper for your version of Oracle, and start doing ADO.NET with your favorite database! =P
There are also some other tools that you can work with that will ease your data access code pain, such as Enterprise Library or NHibernate, both are frameworks to basically accessing databases.
Enterprise Library can do even more then that!
And NHibernate is an ORM (Object/Relation Mapping) tool that can work just very fine with Oracle.
Remember though, always use Oracle.Data.Client namespace in the Oracle.DataAccess.dll assembly.
What is its equivalent in MySQL ?
As the equivalence for MySQL, I guess it would be MySQL Connector/NET.
It is the Oracle binaries installed that allow communication with the Oracle database. It can be using SQL*Plus, JDBC (type II or IV) or OCI (Oracle Call Interface).
Its a piece of software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicated with the database, you would use the Oracle Client to facilitate that communication

Resources