Configure Environment
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 Explorer | Configure, explore, and import database data |
Objects
SQLConnectionOptions | Define JDBC database connection options (Since R2020b) |
SQLConnectionOptions | Define ODBC database connection options (Since R2024a) |
Functions
Topics
Database Environment
- Choose Between ODBC and JDBC Drivers
Discover the differences between ODBC and JDBC drivers, and choose the correct driver for your situation. - Configure 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.
macOS ODBC
- Microsoft SQL Server ODBC for macOS
Configure an ODBC data source for a Microsoft SQL Server database for macOS. - Microsoft SQL Server ODBC for macOS DSN-Less Connection
Verify your driver installation and connect to a Microsoft SQL Server database for macOS using a DSN-less connection string. - MySQL ODBC for macOS
Configure an ODBC data source for a MySQL database for macOS. - MySQL ODBC for macOS DSN-Less Connection
Verify your driver installation and connect to a MySQL database for macOS using a DSN-less connection string. - PostgreSQL ODBC for macOS
Configure an ODBC data source for a PostgreSQL database for macOS. - PostgreSQL ODBC for macOS DSN-Less Connection
Verify your driver installation and connect to a PostgreSQL database for macOS 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
- Databricks ODBC Driver for Database Toolbox Support Package
Install the Databricks® ODBC driver. - MariaDB ODBC Driver for Database Toolbox Support Package
Install the MariaDB® ODBC driver. - PostgreSQL ODBC Driver for Database Toolbox Support Package
Install the PostgreSQL ODBC driver. - Other ODBC-Compliant or JDBC-Compliant Databases
Configure a driver and data source for other ODBC-compliant or JDBC-compliant databases.