Error while connecting to Oracle Database from Matlab (64 bit) and Windows (64 bit) using Microsoft Oracle ODBC Driver

3 views (last 30 days)
Hi, I have a Oracle database hosted on a remote machine. I am running 64-bit MATLAB version (2011b) on a 64-bit Windows 7 machine.
I want to connect to the Oracle database using Microsoft ODBC driver for Oracle.
I am trying to connect to the Oracle database using the following connection string
PROVIDER=MSDASQL;DRIVER={Microsoft ODBC for Oracle};SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=yyyy))(CONNECT_DATA=(SERVER=DEDICATED)(SID=zzzz)));UID='wwww';PWD='yyyy';
While trying to connect, I am getting the following error
Invoke Error, Dispatch Exception:
Source: Microsoft OLE DB Provider for ODBC Drivers
Description: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Could you please help me in resolving the error at the earliest.
The same code is running perfectly on 32-bit windows machine.
Thanks,
Satish

Answers (1)

Shruti Sapre
Shruti Sapre on 31 Aug 2015
Hello Satish,
I understand that you are trying to connect to an Oracle database using the ODBC driver for Oracle.
From the error message description you posted, it looks like it did not find a data source for the name given during connection. It’s likely that there was a difference in the spelling or that the data source was not created. Could you confirm if you can see the name of the data source used in your connection in the "User Data Sources" list that shows up in the "ODBC Data Source Administrator"? This is opened by following the below steps in MATLAB:
Database Explorer app->New->ODBC (Configure ODBC Data Source)
A list of these error messages are given at the below link:
Additionally, you would also need to have a 64-bit driver to connect through 64-bit MATLAB, or a 32-bit MATLAB to connect to a 32-bit driver as running this on a different combination is not supported.
Please refer to the below link for details on the compatibility of the bitness of MATLAB, the ODBC driver and the database. This also provides details about the creation of data source along with how to connect to the database:
Hope this helps!
-Shruti
  1 Comment
SatishB
SatishB on 31 Aug 2015
Hi Shruti,
First of all, Many Thanks for your detailed reply.
Actually, I want to connect to the Oracle database using Microsoft ODBC driver - 64 bits (not using Oracle ODBC driver).
Also, I dont have the database toolbox. So, I would like to connect to the database using a connection string.
Thanks,
Satish

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!