Follow these instructions to replicate your IBM Db2 on Cloud database to your destination using Fivetran.
To connect your IBM Db2 on Cloud database to Fivetran, you need:
- IBM Db2 on Cloud 11.1 or above
- Your database host’s IP (e.g.,
126.96.36.199) or domain (
- Your database’s port (usually
50000for non-TLS connections or
50001for TLS connections)
Choose a connection methodlink
Decide whether to connect to your destination directly or connect using an SSH tunnel.
- To connect using an SSH tunnel, follow these instructions.
- To connect directly, configure your firewall and/or other access control systems to allow incoming connections to your IBM Db2 on Cloud database host and port from Fivetran’s IP.
Create an operating system user for Fivetran.
Connect to your database as an admin user.
Execute the following SQL command to grant the Fivetran user permission to connect to your database’s transaction log. Replace
<username>with the name of your Fivetran user.
GRANT DBADM ON DATABASE TO USER <username>;
Grant read-only accesslink
Once you’ve created the Fivetran user, grant it
SELECT permission for each schema and table you would like to sync:
GRANT SELECT ON <schemaA>.<tableA> TO USER <username>; GRANT SELECT ON <schemaA>.<tableB> TO USER <username>; GRANT SELECT ON <schemaB>.<tableC> TO USER <username>;
Enable data capture changelink
Execute the following command to enable data capture change on the tables that you would like to sync:
ALTER TABLE <schemaA>.<tableA> DATA CAPTURE CHANGES; ALTER TABLE <schemaA>.<tableB> DATA CAPTURE CHANGES; ALTER TABLE <schemaB>.<tableC> DATA CAPTURE CHANGES;
Fivetran performs the following tests to ensure that we can connect to your IBM Db2 on Cloud database and that it is properly configured:
- The Connecting to SSH Tunnel Test validates the SSH tunnel details you provided in the setup form. It then checks that we can connect to your database using the SSH tunnel. (We skip this test if you aren’t connecting using an SSH tunnel.)
- The Validating Certificate Test generates a pop-up window where you must choose which certificate you want Fivetran to use. It then validates that certificate and checks that we can connect to your database using TLS. (We skip this test if you aren’t connecting directly.)
- The Connecting to Database Test checks that we can access your database.
- The Validating Tables with Data Capture Change Test checks that at least one table in your database has data capture change enabled.
- The Validate Db2 Log Archive Test verifies that we can access the archived log files in your IBM Db2 on Cloud database.