IBM Db2 Destination
Use IBM Db2 with Segment to get all of your event and Cloud Source data in a warehouse built by IBM. This guide will walk through what you need to know to get up and running with Db2 Warehouse and Segment.
To get started, you’ll need to:
- Create a Db2 user for Segment.
- Grant the user sufficient permissions.
- Create the the IBM Db2 Destination in the Segment app.
Create a User for Segment
In order to connect your IBM Db2 warehouse to Segment, you need to create a Db2 user account that Segment can assume. To create a user account for Segment:
Open the Db2 warehouse and navigate to Administration > User management.
Create a new user account with user privileges. Make sure you save the username and password, as these are required to set up the Segment configuration in a later step.
Grant the Segment User Permissions
To grant the Segment user access to your database:
- Open the top-left menu in your Db2 Warehouse and select Run SQL.
- In the SQL input, copy the following code snippet, and replace
segment_userwith the user ID that you created above.
GRANT CONNECT, CREATETAB, IMPLICIT_SCHEMA ON DATABASE TO USER <segment_user>
- Click Run All to execute the
Create Segment Db2 Destination
To set up an IBM Db2 destination in the Segment app:
- Open the Segment app, navigate to Connections and click Add Destination.
- Search for and select IBM Db2 Warehouse.
- Select the sources you want to connect to the IBM Db2 warehouse, and click Next.
- Enter a name for your destination, and enter the following credentials:
- Host (You can find this in your Db2 instance, under Administration > Connections)
- Port (50001 is the default for Db2)
- Database name (You can find this in your Db2 instance, under Administration > Connections)
- User (This is the User ID that you created above)
- Password (This is the password that you created above)
- Security (Enter “SSL” in this field)
- Click Connect to connect your Db2 warehouse to Segment.
If your Db2 Warehouse is in a private network, be sure to allowlist Segment’s IP address when creating the Db2 user Segment assumes. Otherwise, Segment won’t be able to load your data.
Segment recommends you to create a unique User for the Segment Db2 Warehouse connection to your Db2 Warehouse instance so that you can manage permissions separately.
Always require SSL/TLS and make sure your data warehouse can only accept secure connections. Segment only connects to your data warehouse using SSL/TLS.
This page was last modified: 14 Jun 2022
Questions? Problems? Need more info? Contact Segment Support for assistance!