---
title: "DB2 Datasource plugin for Grafana"
description: "Grafana DB2 Data Source. DB2 Datasource plugin for Grafana by Grafana Labs. Available in Grafana Cloud and self-managed Grafana."
---

> This is the Markdown version of https://grafana.com/grafana/plugins/grafana-db2-datasource/

# DB2 Datasource

- Developer: Grafana Labs
- Version: 0.1.0
- [Installation](https://grafana.com/grafana/plugins/grafana-db2-datasource/installation.md)
- [Change log](https://grafana.com/grafana/plugins/grafana-db2-datasource/changelog.md)

# Grafana DB2 Data source

**This data source had been deprecated. Use the [Grafana Sqlyze data source](https://grafana.com/docs/plugins/grafana-odbc-datasource/latest/).**

A Grafana data source plugin for IBM DB2

# BETA

This plugin is currently in BETA development and subject to change.

The BETA version currently returns all values as text. You can use [Grafana Transformations](https://grafana.com/docs/grafana/next/panels/transform-data/about-transformation/) to convert text fields to the proper data type (date, number, etc).

## The DB2 data source uses ODBC

This plugin has a dependency on ODBC. Windows/Linux/MacOS all support ODBC. Some dependencies may need to be installed.

### Using ODBC with Linux or MacOS

### Install or make sure unixODBC is installed

<https://www.ibm.com/docs/en/db2/11.5?topic=managers-installing-unixodbc-driver-manager>

## This plugin requires an ODBC driver. ODBC Drivers for DB2 are available through IBM or 3rd parties.

### IBM drivers

- Can be downloaded from IBM Fix Central where you can choose your DB2 Version and Platform: <https://www.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm%7EInformation%20Management&product=ibm/Information+Management/IBM+Data+Server+Client+Packages&release=11.5.*&platform=Mac+OSX&function=all>

- Driver Settings - set the path to where the driver is installed and add required settings (MacOS example below)

| Setting           | Example Value                            |
| ----------------- | ---------------------------------------- |
| Driver            | /Applications/dsdriver/lib/libdb2o.dylib |
| Timeout (seconds) | 10                                       |
| host              | 127.0.0.1                                |
| port              | 50000                                    |
| uid               | db2inst1                                 |
| pwd               | ••••••••••••                             |
| database          | sample                                   |

### Third party drivers

Settings vary per driver. This plugin allows any key/value pair to support various DB2 ODBC drivers.
