Oracle odbc driver 64 bit excel

Is there a 64-bit Oracle ODBC driver that supports TNS-less connection (or EZ-Connect) convention? I used to use «Microsoft ODBC for Oracle» which allowed a TNS-less connection string, but that has been depreciated for a long time and there is no 64-bit version (i.e. it won’t work for 64-bit Office/Excel).

I’ve had the experience that user’s in my organization sometimes have a missing or invalid tnsnames.ora file. I want to use a DSN-less connection-string in that does not require tnsnames.ora that can be successfully executed on any computer with the proper Oracle drivers installed. This is an example of my old DSN-less, TNS-less connection string that used the depreciated «Microsoft ODBC for Oracle» driver (still works for users on 32-bit office):

DRIVER={Microsoft ODBC for Oracle}; UID=myun; PWD=mypass;
SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
       (HOST=myhostname)(PORT=1521))(CONNECT_DATA=(SID=mysid)));

I have been trying to connect with Oracle in OraClient11g_home1 ODBC drivers from Oracle but no matter how I try (including EZ_Connect) I can not get it to work without it needing tnsnames.ora, I constantly get this pop-up asking me to specify a service name anyway:

enter image description here

I have tried using EZ-Connect and many other variations of specifying the Oracle server IP/hostname directly like below but have had no luck:

Driver={Oracle in OraClient11g_home1};Server=//OracleIPAddress:1521/MySID;
Uid=myUsername;Pwd=myPassword;

In this oracle tutorial, we will learn how to connect excel to an oracle database. also, we will cover these topics.

  • Connect Excel to Oracle Database
  • Connect Excel to Oracle Database 12c
  • Excel Connect to Oracle Database without ODBC
  • Excel Connect to Oracle Database with ODBC
  • Excel Connect to Oracle Database using OLED
  • Excel Connection String to Oracle Database
  • Can you link excel to Oracle Database

In this section, we will learn how to connect Excel to Oracle Database without ODBC.

  • Microsoft Excel has built-in feature of connecting excel to oracle database and we show show you how to use it.
  • Once the connection is established, you will be able to access all the files in the oracle database of that common particular user.
  • In our case, c##sqlserverguides is the name of our common user name. Please note that it is mandatory to c## as suffix while creating a user name.
  • There are three things required to connect excel with the oracle database.
    • Server or SSID
    • Username
    • Password
  • Default ssid is “orcl” which is also the Global Database name. In case you have changed it or created a new one then please mention that one.
  • Open Microsoft Excel and click on the Data tab, from there click on the the From Database dropdown and select ‘From Oracle Database‘.
Connect Excel to Oracle Database
Connect Excel to Oracle Database
  • If you encounter this error then simply click on the on the OK button. The error won’t create problem while connecting excel with the Oracle database.
Oracle.DataAccess.Client is not Installed
  • Enter the name of server or ssid here. ssid is the name of the global database created at the time of installation. In our case, it is ‘orcl’, click on the ok button to proceed.
Enter Server or SSID to connect excel with oracle database
Enter Server or SSID to connect excel with oracle database
  • Excel is connected to oracle database now you can browse of all the oracle data on the microsoft excel.
Excel Connected to Oracle Database

Read How to Check Oracle Database Version

Connect Excel to Oracle Database with ODBC

In this section, we will learn how to connect excel to the oracle database on the windows operating system.

  • Offline installed Excel software can only be connected to the oracle database. Web based excel won’t give option to connect with the database.
  • First step in the process is we have to create a new data source on “Windows Administrative Tools” on windows operating system.
windows administrative tools
Windows Administrative Tools
  • Inside “Windows Administrative Tool” click on the ODBC Data Sources (64-bit). From the appeared prompt select “User DSN” tab and click on Add button.
  • Another prompt will appear “Create New Data Source” in that prompt select “Oracle in OraDB19Home1“. This name may change in future but it will always start with the key ‘oracle’. Click on the the finish button.
create new data source
Create New Data Source
  • Once you clicked on the finish button in the previous option, you will see “Oracle Database Driver Configuration” window.
  • Data Source Name: Name provided here will reflect in excel and you have to choose it over there.
  • Description: If you want to add a little description about your database you can write it here. Description can also be treated as instruction for other users of the database.
  • TNS Service Name: ‘orcl’ is the global database configured while installing the Oracle databse software. Incase you have changed it or created a new one then mention that here.
  • User ID: It is optional to provide user id. You can mention the common username here.
  • Click on the “Test Connection” button and provide the username and password and click on the ok button. If a prompt appear “Test Successful” that means you can move to next step now. Click on the Ok button on the “Oracle ODBC Driver Configuration” window.
oracle odbc driver connect
Oracle ODBC Driver Connect
  • Open Microsoft Excel and click on the Data tab, from there click on the the Get Data dropdown and select ‘From Other Sources‘, click on the option “From ODBC“.
Connect Excel to Oracle Database
Connect Excel to Oracle Database
  • Select the Data Source Name that we created in Oracle Odbc Driver Configuration.
  • Once done, it will ask for the username and password. Enter the credential and you will see that a screen with Navigation title will appear and now you can browse your data there. This is how we can connct excel with oracle database.
select database from ODBC in oracle database

Read How to Get List all Tables in Oracle Database

Connect Excel to Oracle Database 12c

In this section, we will learn how to connect excel to oracle database 12c on the windows operating system.

  • Oracle has released various versions so far out of these 12c and 11g were most popular and widely used versions.
  • Current stable long term version is Oracle database 19c and 21c is in innovation mode.
  • Though 12c has been obsolete still many organisations are still using it.
  • Steps to connect excel to oracle database 12c is similar to oracle database 19c. So you can follow section section “Connect Excel to Oracle Database with ODBC” of this tutorial.

Read: How to create table in Oracle

Excel Connect to Oracle Database without ODBC

In this section, we will learn how to connect excel connect to the oracle database without ODBC on the windows operating system.

  • Most of the connection between microsoft excel and oracle database are established using ODBC.
  • This type of connections are established in previous versions of microsoft excel when there was no option for from connecting oracle directly with excel.
  • In new versions there is already option to connect with oracle database as you can see in the below image.
from oracle database option in excel
From Oracle Database Option in Excel
  • In case this option is not available then using oled you can connect with the database.
  • to see practical implementation of excel connect to oracle database with oled visit the first section of this tutorial ” Connect Excel to Oracle Database”.

Also, check: How to Fetch Data from Oracle Database in Python

Excel Connect to Oracle Database using OLED

In this section, we will learn how excel connects to an oracle database using OLED in the Microsoft Windows operating system.

  • Open Microsoft Excel and click on the Data tab, from there click on the the Get Data dropdown, now click on ‘From Other Sources‘ and select From OLEDB.
excel connect to oracle using oled
Excel Connect to Oracle Database using OLED
  • In the connection string prompt enter the below code. In our case ‘orcl’ is the name of our global database so we have set source=orcl.
provider=OraOLEDB.Oracle.1;data source=orcl
  • After entering the above code click on the build button a new promot will appear “Data Link Properties”. Enter the user name and password for the user you want to connect with. In our case we are connecting with “c##sqlserverguides”.
  • Once filled all the required information (username & password) click on “Test connection” button. If Test connection succeeded click on ok for all the three screens.
microsoft data link to excel connect with oracle database using oled
Microsoft Data Link
  • New prompt will appear immedietly after clicking on ok button of “From OLE
    DB” window.
  • Enter username and password one last time and click on connect. It may take few seconds then excel will be connected to oracle database.
final step excel connect to oracle database using oled
Final Step: Excel Connect to Oracle Database using OLED
  • Below is the window that will appear on the successful establishment of the connection. You will be able to access all the files, folder and tables available inside the connected user.
Excel Connected to Oracle Database
Excel Connected to Oracle Database

Read: Oracle get database name

Excel Connection String to Oracle Database

In this section, we will learn how to establish an excel connection string to an oracle database.

  • While connecting excel to oracle database you must have noticed ‘Credential Connection String’ box that might be optional in some cases.
  • Excel Connection String holds all the information about the connecting database like host, hostname, port, IP address, server type and service name.
  • while connecting excel to oracle database using oled we have to provide excel connection string that you can us the below excel connection string to connect with oracle databse.
provider=OraOLEDB.Oracle.1;data source=orcl
  • If you are advance user and want to connect via oracle database on server than you can configure the setting using the below code.
provider=OraOLEDB.Oracle.1;data source=
             ("
              DESCRIPTION = 
                 (ADDRESS = 
                   (PROTOCOL = TCP)
                   (HOST = localhost)
                   (PORT = 1521)
                 ) 
              (CONNECT_DATA = 
                  (SERVER = DEDICATED) 
                  (SERVICE_NAME = orcl))
              )"

Can you link excel to Oracle Database

In this section, we will answer the question “can you link excel to the oracle database“.

  • Yes, we can link excel to oracle database and there are multiple ways of doing that.
  • In this tutorial, we have explained 3 mojor ways that are widely used to connect excel to oracle database.
    • Connect excel to oracle database
    • Excel Connect to Oracle Database with ODBC
    • Excel Connect to Oracle Database using OLED
  • Visit each section to learn more about how to connect excel with oracle database.

In this tutorial, we have learned how to connect excel to an oracle database. Also, we have covered these topics.

  • Connect Excel to Oracle Database
  • Connect Excel to Oracle Database 12c
  • Excel Connect to Oracle Database without ODBC
  • Excel Connect to Oracle Database using OLED
  • Excel Connection String to Oracle Database
  • Can you link excel to Oracle Database

Bijay

I am Bijay having more than 15 years of experience in the Software Industry. During this time, I have worked on MariaDB and used it in a lot of projects. Most of our readers are from the United States, Canada, United Kingdom, Australia, New Zealand, etc.

Want to learn MariaDB? Check out all the articles and tutorials that I wrote on MariaDB. Also, I am a Microsoft MVP.

Hello everyone, welcome to my blog. In this article, I am going to show you how to install Oracle ODBC Driver on Windows 10. I have a working Oracle Database 12c on another computer on my home network. I am trying to connect to my Oracle database from Microsoft Access using ODBC connection. By default, Windows 10 does not shipped with Oracle ODBC connection utility. In other word, I was unable to connect to my Oracle database from MS Access.

Installing Oracle ODBC Driver on Windows 10 is a bit tricky. It’s not as simple as installing PostgreSQL ODBC driver or MySQL ODBC Driver. I was struggling to get it works. The following method works very well on my home network. So let’s dig inside.

My Setup

  • I have a Windows 10 running Oracle Database 12.2
  • I am going to connect to my Oracle Database via ODBC from another computer, running Windows 10 as well.

Step 1. Install Oracle Instant Client Basic

Oracle ODBC Driver needs this Instant Client package to run. So, we need to download this package from the official download website of Oracle.

https://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html

Select the correct architecture of your system either 32 bit or 64 bit. In this example I am going to install the 32 bit version since I have MS Office 32 bit version.

Next, download the Instant Client Basic package as shown on the picture above. Also, you will need to download the Instant Client SDK and Instant Client ODBC as shown below

So now we have three packages:

  • instantclient-basic-nt-12.2.0.1.0.zip
  • instantclient-sdk-nt-12.2.0.1.0.zip
  • instantclient-odbc-nt-12.2.0.1.0-2.zip

Now Create a new folder for the Oracle client. For example, in this case I created a new folder : C:OracleProductclient. Put all those three zip packages in that new directory. Next, extract them all. It will produce a new directory called: instantclient_12_2. If you download the different version, for example version 18.3, it will create new directory instantclient_18_3.

Step 2. Add the Oracle Client directory to the PATH environment

Now we need to add our Oracle Client directory to the Windows PATH environment. Right-click My Computer >> Advanced System Settings >> Environment Variables

On the System Variables, click New and then enter the following details:

  • Variable name: OCI_LIB32
  • Variable Value: C:OracleProductclientinstantclient_12_2

Change C:OracleProductclientinstantclient_12_2 with your actual Oracle Client folder.

Next step is to add the Oracle Client directory to system path. Double click the path and create a new entry as follow

Step 3. Install the Oracle ODBC Client

Now open the folder instantclient_12_2, in your Oracle Client folder created on the Step 1 and double click the file odbc_install.

Please note that there is no GUI installation wizard when you open this file.

Step 4. Create a new ODBC Data Source on Windows 10

To create a new Oracle ODBC Data Source, open Control Panel >> Administrative Tools >> ODBC Data Sources (32bit). If you are using 64 bit version, choose the ODBC Data Sources (64bit).

Click Add to add a new DSN. Select “Oracle in instantclient_12_2” from the list. Click Finish. Next, enter the Oracle ODBC Driver Configuration. Give the new Data Source Name, select TNS Service Name and User ID. Click Test Connection to validate the connection to the Oracle Database Server.

Troubleshooting

On my first attempt, I cannot get the list of the TNS Service when creating a new ODBC Connection. To solve this, we need to copy or create the tnsnames.ora in the Oracle Client Directory. Open Notepad and then copy and paste these lines and then save it as tnsname.ora. Save the file in the Oracle Client directory (C:OracleProductclientinstantclient_12_2).

This is the content of my tnsnames.ora which is works well

LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.51)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
MYDB01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.51)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb01)
)
)

After that, we need to tell the system to use this tnsnames.ora config file. Open the Environment Variable again and add a new entry with the following value:

  • Variable Name: TNS_ADMIN
  • Variable Value: C:OracleProductclientinstantclient_12_2

Don’t forget to change the variable value with your Oracle Client Directory.

Now you should be able to pick or select the TNS service. Thanks for reading this how to install Oracle ODBC driver on Windows 10. Cheers

Like this post? Please share to your friends:
  • Oracle excel to database
  • Oracle add in for excel
  • Or function in if function excel 2007
  • Or and if combination in excel
  • Options pricing excel model