You are here: Working with Task Components > Database drivers

Database drivers

[Note - this section is about connecting to databases external to MD Link. This is not to be confused with MD Link's persistence database, which is internal to MD Link.]

If you wish to use MD Link to read from or write to a database, some understanding of how MD Link connects to databases is warranted.

MD Link has several components which allow your MD Link solution to connect to a database from any number of vendors, for example Microsoft SQL Server, Oracle, Postgres, MySQL, and many more. All of MD Link's database components perform all of their database access using JDBC. JDBC stands for 'Java Database Connectivity', and is a standard which enables third-party clients programs (such as MD Link) to talk to databases from different vendors (eg. Microsoft SQL Server, Oracle, etc.)

In order for MD Link to connect to your particular type of database, a JDBC driver is required. A JDBC driver is a small piece of software written by the database vendor and typically distributed free of charge. The driver conceptually sits between MD Link and the database in question, and handles all communication between the two. Without the driver, there can be no communication between the two. So it is crucial that MD Link has access to the correct driver for your database.

MD Link comes bundled with drivers for some databases, including Microsoft SQL Server, Oracle Database, Apache Derby, and DB2 on iSeries. In the MD Link Studio, on your database component's properties panel, where you specify the driver class name, there is a drop-down list showing the drivers that come bundled with MD Link. If the driver for your database vendor is shown in this list, then you can select it and proceed to enter the other connection details. Otherwise, you will need to manually install the database driver.

Manually installing database drivers

JDBC drivers are typically written and maintained by the database vendor. They are usually (but not always) distributed in the form of a single self-contained '.jar' file. This file is all you need to make MD Link connect to your database. Often this file can be found within the installation directory of your database software, or your database's documentation will mention where it can be obtained. For some databases, you will need to search online. Regardless, the first step is to acquire this driver file.

After you have acquired it, installation into MD Link is as simple as copying it into the database-drivers subfolder of MD Link's data folder. If you are running any MD Link programs (Server, Monitor, Studio), restart them. MD Link is now able to connect to your database.

You will still need to enter the driver's class name and the appropriate URL (not to mention username and password) on your database component's properties panel. Consult your database driver's documentation in order to determine appropriate values for these fields.