Database Toolbox |
Setting Up a Data Source for JDBC Drivers
To set up a data source for use with a Windows or UNIX system using JDBC drivers, include a pointer to the JDBC driver location in the MATLAB file $matlabroot/toolbox/local/classpath.txt
and restart MATLAB.
For example, if you have an Oracle database system that includes the JDBC drivers in the classes111.zip
file, perform the following steps:
$matlabroot/dbtools
.
classes111.zip
file into dbtools
.
classes111.zip
file to the classpath.txt
file, by including this line in classpath.txt
The filename that contains the JDBC drivers is different for each database system. The file is available from your database provider. See the database
reference page for examples of JDBC drivers and URLs.
For some databases, you first need to unzip the file containing the JDBC drivers, and then put the extracted file into dbtools
and add it to classpath.txt
. You can use the MATLAB unzip
function to unzip the file.
For My SQL with JDBC drivers, add the JAR
file reference to $MATLAB/toolbox/local/classpath.txt
. This is an example:
The classpath.txt
file includes a line that specifies the location of classes111.zip
. This is provided as an example only. If the classes111.zip
file is not located where classpath.txt indicates, MATLAB will not be affected. If classes111.zip
, or a similar file for your database system, is in a different location than classpath.txt
indicates, update classpath.txt
with the correct location and filename.
Setup for Using Visual Query Builder on UNIX Platforms
If you want to use the Visual Query Builder on UNIX platforms, perform these steps to set up the JDBC data source. (You cannot use the Visual Query Builder on a Windows platform with a JDBC driver.)
To remove a data source, select it from the Data source list in the Configure Data Source dialog box, click Remove, and click OK.
See the database
reference page for examples of JDBC drivers and URLs.
Setting Up a Data Source for ODBC Drivers | Starting the Database Toolbox |
© 1994-2005 The MathWorks, Inc.