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

4 次查看(过去 30 天)
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

回答(1 个)

Shruti Sapre
Shruti Sapre 2015-8-31
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 个评论
SatishB
SatishB 2015-8-31
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by