Connecting to your Db2 database
You can connect command-line interfaces, IBM® or third-party applications and tools, or apps that you create to your database.
Prerequisites
- Collect database details and credentials
To connect to your database, you need database details (such as the host name), as well as credentials (such as a user ID and password).
- Verify that a supported driver is installed
- If your application or tool already contains the Db2 v11.1 IBM Data Server Driver Package, then your application or tool is able to connect to your Db2 database by using that driver.
- Otherwise, install the Db2 driver package.
- Configure your environment
- Add entries to the driver configuration file,
db2dsdriver.cfg
, for your database. - Secure Sockets Layer (SSL)
You can choose to connect with or without SSL. Connection details, such as which port to use and the connection string, depend on whether or not you use SSL connections.
To use SSL connections, you need a CA certificate:- If you use the latest Db2 driver package, the certificate file is bundled with the package and will be used for connections.
- Add entries to the driver configuration file,
- Confirm ports are available
If your network is behind a firewall, confirm that communications are permitted on port number
50000
for standard protocols or port number50001
for SSL connections.
- Collecting connection information
- Database details and connection credentials
- Downloading and installing driver package
- Configuring your environment
Connecting programmatically
Integrating apps and tools
- Data integration
-
- Connect your native IBM® Cloud applications that need a database.
- DataStage®
- InfoSphere Data Replication
- Segment
- Data Studio
- Data Server Manager
- Connecting CLPPLUS
- Aginity Workbench
- InfoSphere Data Architect
- Data visualization / BI
- Data science
Connecting to another Db2 database
Db2 data virtualization (also known as federation) is supported. 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.