Database Connection Error Messages
This table describes how to address common errors you might encounter while connecting to the Database Toolbox™ using Database Explorer or the command line.
Connection Error Messages and Probable Causes
Vendor | Error Message | Probable Causes | Resolution |
---|---|---|---|
All | Undefined variable 'database' or class
'database.ODBCConnection'. |
|
|
Unable to access data source name. Use databaseConnectionOptions to
create a JDBC data source. Use configureODBCDataSource to create an ODBC data
source. | The specified data source name does not exist. This error message occurs with Windows® only. | Create a JDBC or ODBC data source using the corresponding | |
Parameter name must be 'AutoCommit', 'ReadOnly', 'LoginTimeout',
'ErrorHandling'. | The specified name-value arguments are invalid with the
| Specify one or more of these valid name-value arguments with the | |
All ODBC-Compliant Databases | [Microsoft][ODBC Driver Manager] Data source name not found and no default driver
specified | Data source name is not spelled correctly. | Verify your data source name. |
[Microsoft][ODBC Driver Manager] The specified DSN contains an
architecture mismatch between Driver and Application | There is a difference in the bitness (32-bit or 64-bit) between the database, driver, and MATLAB. | Use a 64-bit driver. If you have issues working with the ODBC driver, use the JDBC driver instead. For details about driver installation, see Configure Driver and Data Source. To address differences in bitness for Microsoft Access®, see Microsoft Access ODBC for Windows. | |
ODBC Driver Error: [unixODBC][Driver Manager]Can't
open lib‘/driver.dylib' : file not found |
|
| |
ODBC Driver Error: [unixODBC][Driver Manager]Data
source name not found and no default driver specified |
|
| |
ODBC Driver Error: [iODBC][Driver
Manager]dlopen(MariaDB ODBC Driver, 0x0006): tried: 'MariaDB ODBC Driver' (no such
file) | iODBC cannot find the driver. | Make sure that the driver entry is installed at
| |
Error using odbc
Unable to access data source name | Data source name is not spelled correctly. | Make sure that the data source entry is installed at
| |
All JDBC-Compliant Databases | Unable to find JDBC driver file on MATLAB Java class path. | You specify a path to the JDBC driver JAR file that is not on the static or dynamic class path. Or, you specify an incorrect driver name in the Driver box of the JDBC Data Source Configuration dialog box. | Specify the full path to the JDBC driver file in the Driver
Location box and the correct driver name in the
Driver box of the JDBC Data Source Configuration dialog box.
For details, see the |
Unable to access data source name. Use databaseConnectionOptions to
create a JDBC data source. | The specified data source name does not exist. This error message occurs with UNIX® only. | Create a JDBC data source using the | |
JDBC data source does not contain driver location. Use
databaseConnectionOptions to specify JDBC driver location. | The specified driver location in the JDBC data source is invalid. | Modify the JDBC data source to specify a valid JDBC driver location using
the | |
Microsoft Access | [Microsoft][ODBC Microsoft Access Driver] ‘(unknown)’ is not a valid path. make
sure that the path name is spelled correctly and that you are connected to the
server on which the file resides | Error occurs in the Connection Failure dialog box after clicking Connect in the Connect to a Data Source dialog box. The file location of the Microsoft Access database is incorrect. | Verify the location of the database file. If the database file is on a network drive, map to the network drive. Modify the existing file location by selecting New > ODBC and selecting the existing database name from the ODBC Data Source Administrator dialog box. Then select Configure to change the database file location. |
Microsoft® SQL Server® | The TCP/IP connection to the host | Incorrect server name or port number. | Verify your database server name and your port number. Microsoft SQL Server uses a dynamic port for JDBC. Verify the value using Microsoft SQL Server Configuration Manager. For details, see Step 2. Verify the port number. |
Microsoft SQL Server | This driver is not configured for integrated authentication. | The Microsoft
SQL Server Windows authentication
library is not added to | Add the Microsoft
SQL Server Windows authentication
library to |
Microsoft SQL Server | Invalid string or buffer length. | 64-bit ODBC driver error. | Use a JDBC driver or the native ODBC interface instead. |
Microsoft SQL Server | JDBC Driver Error: com.microsoft.sqlserver.jdbc.SQLServerDriver.Driver Not
Found/Loaded. | The full path to the JAR file was not added to the | Ensure that the path to the JAR file is not misspelled. Ensure that you add the path to the static class path. |
Microsoft SQL Server | com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit> WARNING: Failed to
load the sqljdbc_auth.dll | The path to the folder containing the file | Add the path to the folder containing the file |
Microsoft SQL Server | Login failed for user 'DOMAIN\username'. | Either the login credentials you are using are incorrect or your user account does not have enough rights to access the remote machine. This error also occurs when the database server is not configured to accept Integrated Windows Authentication login credentials. | Ensure that your user name and password are correct. Refer to your system administrator for appropriate access rights to your machines. Contact your database administrator to see if your database is set up with Windows Authentication. |
Microsoft SQL Server | MSSQLSERVER_ | The Microsoft SQL Server driver returns a numbered error message. | Find more information about the specific error in System Error Messages. |
MySQL® | Access denied for user 'user'@'machinename' (using password:
YES) | Incorrect user name and password combination. | Verify your user name and password. |
MySQL | Communications link failure. | Incorrect server name or port number. | Verify your database server name and port number. |
MySQL | Unknown database 'databasename'. | Provided database name is incorrect. | Verify your database name. |
MySQL | ERROR | The MySQL driver returns an error that contains an error number, a
SQLSTATE value, and an error message. | Navigate to the latest database documentation in the MySQL Documentation, and search for the specific error. |
Oracle® | Error when connecting to Oracle oci8 database using JDBC driver: Error using
com.mathworks.toolbox.database.databaseConnect/makeDatabaseConnection Java
exception occurred: java.lang.UnsatisfiedLinkError: no ocijdbc11 in
java.library.pathat java.lang.ClassLoader.loadLibrary(Unknown Source)at
java.lang.Runtime.loadLibrary0....... | MATLAB cannot find the Oracle DLL that the | Add the path for the location of the Oracle DLLs to |
Oracle | Invalid Oracle URL specified: OracleDataSource.makeURL | The | Specify the |
Oracle | The Network Adapter could not establish the connection. | Either | Verify the server name and port number for your Oracle database. |
Oracle | TNS:listener does not currently know of SID given in connect descriptor: Incorrect
database name or incorrect URL. | The service name for your database is incorrect. | Verify the service name for your Oracle database. |
Oracle | ORA- | The Oracle driver returns a numbered error message. | Navigate to the latest database documentation in the Oracle Documentation, and search for the specific error. |