Main Content

Configure Environment

Driver and data source configuration

Configure a data source depending on the database environment. Decide between using an ODBC and JDBC driver. Then, find the configuration instructions based on your operating system and database. You can configure data sources using the appropriate dialog box in the Database Explorer app. Configure an ODBC data source using the ODBC Data Source Administrator dialog box. Configure a JDBC data source using the JDBC Data Source Configuration dialog box or the command line.

For high-level information about using Database Toolbox™, see Access Relational Database Data in MATLAB. To get started by exploring data visually, use the Database Explorer app.

Apps

Database ExplorerConfigure, explore, and import database data

Objects

SQLConnectionOptionsDefine JDBC database connection options

Functions

expand all

configureODBCDataSourceOpen ODBC Data Source Administrator dialog box
databaseConnectionOptionsCreate database connection options
resetReset JDBC connection options to defaults
rmoptionsRemove JDBC connection options
setoptionsSet JDBC connection options
testConnectionTest JDBC database connection
saveAsDataSourceSave JDBC data source
deleteDataSourceDelete data source
listDataSourcesList all available data sources

Topics

Database Environment

Choosing Between ODBC and JDBC Drivers

Discover the differences between ODBC and JDBC drivers, and choose the correct driver for your situation.

Configuring Driver and Data Source

Install drivers and configure data sources for your database environment.

Create JDBC Data Source and Set Options Programmatically

Create and configure a JDBC data source and set JDBC driver-specific options.

Modify and Delete Data Sources

Learn about managing data sources for ODBC and JDBC drivers.

Windows ODBC

Microsoft Access ODBC for Windows

Configure an ODBC driver and data source for a Microsoft® Access™ database for Windows®.

Microsoft SQL Server ODBC for Windows

Configure an ODBC driver and data source for a Microsoft SQL Server® database for Windows.

Microsoft SQL Server ODBC for Windows DSN-Less Connection

Verify your driver installation and connect to a Microsoft SQL Server database for Windows using a DSN-less connection string.

Oracle ODBC for Windows

Configure an ODBC driver and data source for an Oracle® database for Windows.

MySQL ODBC for Windows

Configure an ODBC driver and data source for a MySQL® database for Windows.

MySQL ODBC for Windows DSN-Less Connection

Verify your driver installation and connect to a MySQL database for Windows using a DSN-less connection string.

PostgreSQL ODBC for Windows

Configure an ODBC driver and data source for a PostgreSQL database for Windows.

PostgreSQL ODBC for Windows DSN-Less Connection

Verify your driver installation and connect to a PostgreSQL database for Windows using a DSN-less connection string.

Windows JDBC

Microsoft SQL Server JDBC for Windows

Configure a JDBC data source for a Microsoft SQL Server database for Windows.

Oracle JDBC for Windows

Configure a JDBC data source for an Oracle database for Windows.

MySQL JDBC for Windows

Configure a JDBC data source for a MySQL database for Windows.

PostgreSQL JDBC for Windows

Configure a JDBC data source for a PostgreSQL database for Windows.

SQLite JDBC for Windows

Configure a JDBC data source for an SQLite database for Windows.

Mac JDBC

Microsoft SQL Server JDBC for macOS

Configure a JDBC data source for a Microsoft SQL Server database for Mac.

Oracle JDBC for macOS

Configure a JDBC data source for an Oracle database for Mac.

MySQL JDBC for macOS

Configure a JDBC data source for a MySQL database for Mac.

PostgreSQL JDBC for macOS

Configure a JDBC data source for a PostgreSQL database for Mac.

SQLite JDBC for macOS

Configure a JDBC data source for an SQLite database for Mac.

Linux ODBC

Microsoft SQL Server ODBC for Linux

Configure an ODBC data source for a Microsoft SQL Server database for Linux®.

Microsoft SQL Server ODBC for Linux DSN-Less Connection

Verify your driver installation and connect to a Microsoft SQL Server database for Linux using a DSN-less connection string.

MySQL ODBC for Linux

Configure an ODBC data source for a MySQL database for Linux.

MySQL ODBC for Linux DSN-Less Connection

Verify your driver installation and connect to a MySQL database for Linux using a DSN-less connection string.

PostgreSQL ODBC for Linux

Configure an ODBC data source for a PostgreSQL database for Linux.

PostgreSQL ODBC for Linux DSN-Less Connection

Verify your driver installation and connect to a PostgreSQL database for Linux using a DSN-less connection string.

Linux JDBC

Microsoft SQL Server JDBC for Linux

Configure a JDBC data source for a Microsoft SQL Server database for Linux.

Oracle JDBC for Linux

Configure a JDBC data source for an Oracle database for Linux.

MySQL JDBC for Linux

Configure a JDBC data source for a MySQL database for Linux.

PostgreSQL JDBC for Linux

Configure a JDBC data source for a PostgreSQL database for Linux.

SQLite JDBC for Linux

Configure a JDBC data source for an SQLite database for Linux.

Other Databases

Other ODBC-Compliant or JDBC-Compliant Databases

Configure a driver and data source for other ODBC-compliant or JDBC-compliant databases.

Related Information