How to Install Oracle ODBC Driver: Step-by-step Guide

Installing Oracle ODBC driver for Windows and Linux

Ever since Oracle entered the cloud infrastructure scene, it has provided many handy tools for utilizing its service. Among those is the Oracle Open Database Connectivity (ODBC) driver. If you want to be able to connect to plenty of different data sources from a single compatible application, the Oracle ODBC driver is a must.

If you’ve ever had an interest in what Oracle has to offer in the world of cloud infrastructure, this article is just the place to start. In no time, you can get the ODBC driver up and running and configure your database access however you wish.

This article should help you install and configure an ODBC driver so that you can get it up and running in no time. I’ll also try to shed some light on what exactly you can do with said driver.

The following article will discuss:

  • What is an Oracle ODBC driver?
  • What is the purpose of the ODBC driver?
  • How to Install Oracle ODBC driver for Windows 10.
  • How to Install Oracle ODBC driver for Linux.

What is Oracle ODBC?

At its core, the ODBC driver is essentially an interface, or a gateway. It allows an application to access data from any compatible Oracle database. It allows users to either communicate with local Oracle databases set up through ODBC drivers or to the Oracle database. Essentially, it’s Oracle’s own official cloud.

Overall, it’s an extremely useful tool. Oracle has quickly become one of the biggest competitors in the cloud database market due to its competence in running such a massive project, as well as the useful tools that they supply for it. ODBC, of course, being one of them.

What can you do with Oracle ODBC?

Oracle ODBC drivers allow you to connect through an interface to access data in any compatible Oracle database using Structured Query Language (SQL) . You can set up local connections or cloud network connections with any device that you install the ODBC driver onto.

This is a powerful tool for companies, or even individuals who just need a convenient framework to allow multiple devices to communicate with one another. And the best part is that it’s not as challenging to set up as you might expect. Most people associate cloud infrastructure with being rather complicated and technical to get started with or use. Oracle, however, has taken a pretty intuitive approach to the way that systems interact with their databases, allowing for a versatile and user-friendly cloud experience.

Regardless, the installation process isn’t exactly as simple as “one click and you’re done” either. To help you get your driver installed properly, this guide will help walk you through the steps.

Getting Started

First thing’s first, you’re going to want to make sure you’ve downloaded the Oracle packages for your system. Go to the Oracle Instant Client webpage to download the package that suits your platform. You’ll want to get the Oracle SDK package for your system as well as the ODBC package.

Make sure that you are getting the correct package and version for your system. You can check the compatibility to be on the safe side by looking here.

Installing Oracle ODBC driver for Windows 10

Windows 10 users have the easier side of things with this installation. Oracle seems to keep its Windows audience in mind with their programs, as they always tend to run smoothly and have few issues in the long run.

Like I said, while this installation isn’t as simple as “one click and you’re done”, it’s not going to be rocket science. As long as you follow along with this guide, you should have no problem getting things all set up.

ODBC Interface for Windows 10

The first thing you’ll want to do is create an Oracle folder in your C: drive. You can do that by going to File Explorer and clicking on your (C:) drive in the left column. Then, right-click an open space and navigate to New and Folder, and click.

Simply name the folder Oracle and hit enter. Now, move all of the Oracle ZIP files that you downloaded into the Oracle folder, and extract them there.

Open the instantclient-basic-windows folder that was extracted. It will have a Windows bit type and a version number following it. Inside should be a subfolder. Move that subfolder into the Oracle folder, and delete the now-empty folder that it was inside.

Now, click your Start button to open the Windows search box. Type System Environment Variables and press enter. You should be brought to a control panel menu that says System Properties.

Click the Environment Variables… button at the bottom, and then click New.

Enter OCI_LIB32 into the Variable Name box. Next, you’ll need to input the Oracle folder path into the Variable Value box. That should be C:\Oracle\instantclient_(your version number) if you followed the previous steps.

Next, double-click Path to open the environment variable table. Click New and enter the same folder path again into the Variable Value box. Then click OK.

Now you can install the ODBC client. Open the instantclient folder in your Oracle folder, and right-click odbc_install.exe. Click Run As Administrator. You won’t get a pop-up to confirm the process, but rest assured. The installation should still be complete.

Open up another search in the Start menu, and type ODBC Data Sources, and hit enter. Click the Add button on the User DSN/System tab to create a new data source.

Find your Oracle ODBC driver, select it, and press Finish.

Fill out the details on the configuration window, and then press OK to finish.

Congratulations! You’ve just installed your ODBC driver.

Installing Oracle ODBC driver for Linux

Now, for Linux users, the process gets a bit rockier. You’ll have to dig a bit more in-depth than with the Windows installation, but if you follow along, you shouldn’t have too much trouble. It’s not rocket science, but it is Linux.

Oracle ODBC interface for Linux

Regardless of which Linux operating system you run, the process should be almost identical. I’ll be using Ubuntu as an example, but these steps should apply to you regardless of your system. Just follow along, and you should have no trouble getting this working smoothly.

Once you’ve downloaded the Instant Client packages, you’ll need to install them and their dependencies. Run the following commands:

sudo apt install alien libaio1

sudo alien -i oracle-instantclient(your version number)-*

Now, you’ll want to make the Oracle libraries available for LD_LIBRARY_PATH. Enter the following commands:

echo /usr/lib/oracle/(your version number)/client64/lib/ | sudo tee  /etc/ld.so.conf.d/oracle.conf && sudo chmod o+r /etc/ld.so.conf.d/oracle.conf

Sudo lfconfig

echo ‘export ORACLE_HOME=/usr/lib/oracle/(your version number)/client64’ | sudo tee /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh

. /etc/profile.d/oracle.sh

After you’ve entered in those hefty commands, all you have to do is ensure that there’s no conflicts or issues with library references for SQL. You can do this by entering ldd ‘which sqlplus64’.

Now, install the unixODBC driver manager. You can find your recommended manager version on the Oracle website here.

Now, run the command odbc_update_ini.sh from the Instant Client directory.

At this point, the driver will be installed and freshly updated. Congratulations! It should be running smoothly now.

If you ran into errors with either installation process, there are alternative and further instructions on the official Oracle Database website here.

Final Points

Oracle’s database service is highly versatile, and there are plenty of different reasons why you’d want to set one up or install the drivers to take advantage of the service. However, the driver setup process can be a bit daunting for some. Hopefully this guide has helped you tackle the installation and get your driver running smoothly!

With your driver up and running, you should now be free to use it as you wish. Whether that be to configure a local database and have full access from any compatible device or to connect directly to the Oracle Database is entirely up to you.

Leave a Comment