- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 08:12 AM
Has anyone successfully connected to a DB2 database on ZOS from a Databricks cluster using a JDBC connection?
I also need to specify an SSL certificate path and not sure if I need to use an init script on the cluster to do so.
Any examples would be very much appreciated.
Thank you.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 12:03 AM
Hi @Karl , Greetings!
I've outlined the steps below to connect from Databricks to IBM DB2 using JDBC:
Step 1: Obtain the DB2 JDBC Driver
- Visit the IBM website to download the appropriate JDBC driver for DB2 on z/OS.
- Reference Document: IBM DB2 JDBC Driver Versions and Downloads
Step 2: Attach JDBC Driver to Cluster
- In the Databricks cluster, navigate to the "Libraries" tab.
- Add the DBFS file path containing the JDBC driver JAR.
- Install the JAR file to the cluster.
Step 3: Create a Notebook and Connect to IBM DB2
- Follow the provided documentation to establish the JDBC connection.
- Execute the cell to establish the JDBC connection.
- Once connected, execute SQL queries in subsequent cells to interact with the IBM DB2 database.
- Reference Document: Databricks JDBC Guide
JDBC URL: jdbc:db2://host-name:50001/BLUDB:sslConnection=true;
Reference Document: IBM DB2 for z/OS JDBC Connectivity Guide
By following these steps, you can establish a JDBC connection from Databricks to your IBM DB2 database and execute SQL queries for data interaction.
Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Regards,
Ayushi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 12:03 AM
Hi @Karl , Greetings!
I've outlined the steps below to connect from Databricks to IBM DB2 using JDBC:
Step 1: Obtain the DB2 JDBC Driver
- Visit the IBM website to download the appropriate JDBC driver for DB2 on z/OS.
- Reference Document: IBM DB2 JDBC Driver Versions and Downloads
Step 2: Attach JDBC Driver to Cluster
- In the Databricks cluster, navigate to the "Libraries" tab.
- Add the DBFS file path containing the JDBC driver JAR.
- Install the JAR file to the cluster.
Step 3: Create a Notebook and Connect to IBM DB2
- Follow the provided documentation to establish the JDBC connection.
- Execute the cell to establish the JDBC connection.
- Once connected, execute SQL queries in subsequent cells to interact with the IBM DB2 database.
- Reference Document: Databricks JDBC Guide
JDBC URL: jdbc:db2://host-name:50001/BLUDB:sslConnection=true;
Reference Document: IBM DB2 for z/OS JDBC Connectivity Guide
By following these steps, you can establish a JDBC connection from Databricks to your IBM DB2 database and execute SQL queries for data interaction.
Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Regards,
Ayushi

