This article describes how to connect Tableau to an IBM DB2 database and set up the data source. You can also use this connector to connect to an IBM DB2 for z/OS database. See the Technical Specifications to confirm which DB2 databases are supported.

Note: Tableau supports all of the IBM operating system platforms except for the "i" series.

Before you begin

Before you begin, gather this connection information:

  • Name of the server that hosts the database you want to connect to (Host name) and port number

  • Database name

  • User name (User ID) and password

  • Are you connecting to an SSL server?

  • (Optional) Initial SQL statement to run every time Tableau connects

Use this connector with Tableau Desktop on a Windows computer.

Port settings

The port number is dependent on the type of server you are connecting to and whether you are connecting to an encrypted port. Generally, use 50000 for a non-encrypted port and 60000 for an encrypted port. It is possible that your server is configured to use a non-standard port. Contact your administrator if you don't know which port to connect to.

SSL requirements

This connector enables you to connect to your server using SSL authentication. If you work in an SSL environment, your computer is probably already configured to support SSL. If you have trouble making an SSL connection with Tableau, make sure that the following IBM software is installed on your computer:

  • IBM Data Server Runtime Client v10.5fp3 or above

  • GSK8 SSL Library

Note:The IBM Data Server Runtime Client and GSK8 Library must have the same bitness. For example, both must be either 32-bit or 64-bit. For more information, see Installation of the GSK8 SSL Library(Link opens in a new window) on the IBM website.

Driver required

This connector requires a driver to talk to the database. You might already have the required driver installed on your computer. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download(Link opens in a new window) page where you can find driver links and installation instructions.

Make the connection and set up the data source

  1. Start Tableau and under Connect, select IBM DB2. For a complete list of data connections, select More under To a Server. Then do the following:

    1. Enter the name of the server that hosts the database (the Host name), the port number, and the name of the database that you want to connect to.

    2. Enter your user name (User ID) and password.

      If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.

    3. (Optional) Select Initial SQL to specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server, or publish to Tableau Server. For more information, see Run Initial SQL.

    4. Select Sign In.

  2. On the data source page, do the following:

    1. (Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.

    2. From the Schema drop-down list, select a schema or use the text box to search for a schema by name.

    3. Under Table, select a table or use the text box to search for a table by name.

    4. Drag a table to the canvas, and then select the sheet tab to start your analysis.

      Use custom SQL to connect to a specific query rather than the entire data source. For more information, see Connect to a Custom SQL Query.

Note: Tableau doesn't support the DECFLOAT data type.

See also

Connecting Tableau to a Db2 database(Link opens in a new window) - Review connection instructions on the IBM website.

Thanks for your feedback!