top of page

Subscribing and Setting up DB2 Free Service on IBM Cloud

In this blog, will be demonstrating how to subscribe to free plan of DB2 service on IBM cloud and setting it up for usage. This blog has 4 sections

  • Section 1 focuses on subscribing to IBM DB2 service on IBM Cloud

  • Section 2 covers creating service credentials for database connectivity

  • Section 3 covers administering database using DB2 console for setting up objects

  • Section 4 focuses on downloading SSL certificate and converting to PEM format

Pre-requisites:

  1. IBM Cloud account (IBM Cloud | IBM)

1. Subscribing to IBM DB2 service on IBM Cloud

  • Log into IBM Cloud account (IBM Cloud | IBM)

  • Click on the Catalog options in the IBM Cloud Dashboard to see the list of the services offered on IBM Cloud and search for DB2.

  • In the DB2 service page, specify the following -

  • Location: select as per your choice

  • Pricing Plan: Lite (free plan)

  • Service name : e.g. DB2-Training (as per your choice)

  • Resource group: select default or any available option as per your choice

  • Email: provide your email id

Select the checkbox for accepting licensing terms and click on Create to subscribe to Db2 Service

  • DB2 service with the name you specified gets provisioned to you on IBM cloud. Wait till the status of the service becomes active as shown below


2. Creating Service Credentials the IBM DB2 database

  • In the resource list screen of IBM Cloud, click on the DB2 service (displayed under Services and software category) that you created

  • From the service page, select the menu option "Service Credentials" to create / access the credentials of the db2 database

  • Click on New Credential button in the Service Credential page to create a new credential

  • Provide the any name for service credential (e.g. appCred) and click on Add

  • New credential gets created and is displayed. Expand the newly to created credential to get the all the details that is required for client application to connect to the database. Note down the value for the following properties separately, which we will use it later to configure our application to connect to this database

Property Name

Value

Database name

<database> [e.g. bludb]

​Host name

​<hostname>

Port

​<port>

User Name

​<username>

Password

<password>

3. Setting up IBM DB2 database

  • In the resource list screen of IBM Cloud, click on the DB2 service (displayed under Services and software category) that you created, if the page is not already opened.

  • From the service page, select the menu option "Manage" and click on Go to UI to launch the DB2 console

  • IBM DB2 on cloud console is opened. To create database objects, click on SQL menu option from the left-side menu

  • SQL editor is opened up for you. Type the query that you want to execute in the SQL editor and click Run all

  • The status of the query execution is displayed at the bottom of the SQL editor as shown below

Above steps can be followed to create any more database objects in future.


4. Downloading DB2 SSL Certificate and converting to PEM format

  • In the console for IBM DB2, click on the spanner like icon which denotes Administration. On the resulting page, click on Download SSL Certificate button to download the DB2 certificate as shown below


  • The SSL Certificate gets downloaded into the local machine, which is in DER format (cert file). To convert the cert file to PEM format, we can use the link SSL Converter - Convert SSL Certificates to different formats (sslshopper.com)

  • In the SSL Converter website specify the following

  • Certificate File to Convert: Upload the downloaded certificate file

  • Type of Current Certificate: DER/Binary

  • Type To Convert To: Standard PEM

Click on Convert Certificate button to download the certificate in PEM format.


In this blog, we have seen how to subscribe to DB2 service on IBM Cloud, setup the database and create service credentials & certificate for application connectivity. In another blog, we will focus on using these details to configure ACE Cloud connector for DB2 to connect and use this database as part of solution development.


Hope this has been help. Please share your valuable comments / suggestions on this post or dropping a note at reachnebula@learnibmesb.com

161 views0 comments
bottom of page