Connecting overview
You can connect command-line interfaces, IBM® or third-party applications and tools, or apps that you create to your Db2 on Cloud database.
Prerequisites
Before attempting to connect to your Db2 on Cloud database, verify that you have the prerequisites.
-
Collect database details and credentials
To connect to your database, you need database details (such as the host name), and credentials (such as a user ID and password.) You can collect this connection information from the Service credentials table of the Db2 on Cloud service instance or from the Db2 on Cloud web console.
-
Verify that a supported driver is installed
- If your application or tool already contains the Db2 v11.5 IBM Data Server Driver Package, then your application or tool is able to connect to your Db2 on Cloud database by using that driver.
- Otherwise, install the Db2 driver package, which you can download from here.
-
Configure your environment
- Add entries to the driver configuration file,
db2dsdriver.cfg
, for your database. - Secure Sockets Layer (SSL)
To use SSL connections, you need a CA certificate:
- If you use the most recent Db2 on Cloud driver package, the certificate file is bundled with the package and is used for connections.
- If you use the IBM Data Server Driver Package, you can download the SSL certificate from the Db2 on Cloud web console.
- Add entries to the driver configuration file,
-
Confirm that ports are available
If your network is behind a firewall, confirm that communications are permitted on the port that is needed to connect to the Db2 on Cloud service. For Enterprise and Standard plans, the port number can be found in the connection information from the Service credentials table of the Db2 on Cloud service instance or from the Db2 on Cloud web console.
Collecting connection information
Downloading and installing driver package
Configuring your environment
Connectivity options
Db2 on Cloud offers multiple secure connectivity options depending on your application connection requirements.
See Connectivity options.
Connecting programmatically
You can use common programming languages to create applications that connect to a Db2 on Cloud database.
Integrating apps and tools
You can also connect external applications and tools to Db2 on Cloud and use them to further manage or analyze your data. For example:
Data integration
- Connect your IBM Cloud® applications that need an analytics database.
- DataStage
Data visualization & BI
Data science
Connecting to another Db2 database
Db2 data virtualization (also known as federation) is supported by Db2 on Cloud. Data virtualization gives you single-query access to all of your data that is on multiple distributed databases anywhere in your organization. You can access data that is on any of your Db2 or Informix data sources, both in the cloud and on premises.
This function is supported on all versions of Db2 on Cloud, except for the free Lite plan. However, you can use the Lite plan as a target from which you can pull data.