IBM DB2

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.

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:

  • v10.5fp3 connector for IBM DB2

  • GSK8 SSL Library

Note that the v10.5fp3 connector and the GSK8 SSL 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 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 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.

IBM DB2 data source example

Here is an example of an IBM DB2 data source:

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

 

See also

Connecting Tableau to a Db2 database - Review connection instructions on the IBM website.

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.