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
0 个评论
回答(1 个)
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!