|
在网上搜了一下,发现和你一样的问题,下面是回复
Subject:Why am I having problems connecting to a remote Oracle 9.2 database using the Database Toolbox?
Problem Description:I am having trouble connecting to Oracle database software version 9.2.0.1.0 using the Database Toolbox 3.0.1. The database is on a remote server (Sun Solaris). I get the following error when I attempt to run the EXEC command:
no constructor with com.mathworks.toolbox.database.sqlExec with matching signature found.
When I read the Message field of the database connection object as follows:
conn = database(...)
conn.Message
I get the following message:
Invalid Oracle URL specified
However, I am able to connect to the Oracle database, using this URL, from Java code outside of MATLAB. I am using an OCI driver to connect to the database and even upgraded to MATLAB 7.0.4 (R14SP2) to try to resolve the issue.
Solution:We recommend that you use the JDBC thin drivers as they are easier to configure than OCI drivers. For JDBC thin drivers, the MATLAB/toolbox/local/classpath.txt entry appears similar t
/home/username/classes111.zip
To make a connection using a JDBC thin driver specify the driver and URL as follows:
Driver: oracle.jdbc.driver.OracleDriver
URL: jdbc:oracle:thin:@192.171.xxx.xx:xxxx:
The Oracle OCI JDBC drivers are type 2 drivers, meaning that there is additional software beyond the base Oracle installation that must be installed. The OCI client software consists of additional libraries that the JDBC OCI drivers need in order to make the connection to Oracle. The location of these installed libraries must be included in the file $MATLAB/toolbox/local/librarypath.txt.
For example, for a UNIX system, if Oracle is installed in /oracle/ora92, the entry in librarypath.txt would appear as
/oracle/ora92/lib32
The files in that directory are:
For Windows:
ocijdbc9.dll
ocijdbc9_g.dll
heterox.dll
heterox_g.dll
(_g indicates debug version)
For UNIX:
Files have .lib extension, ie ocijdbc9.lib
If MATLAB cannot locate the libraries, the following error message appears:
??? Java exception occurred:
java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
To make a connection using a JDBC OCI driver, specify the driver and URL as follows:
Driver: oracle.jdbc.driver.OracleDriver
URL (example): jdbc:oracle:oci8:@fogo
|
评分
-
1
查看全部评分
-
|