This blog article will walk you through step by step direction of setting up Db2 Warehouse on Linux (Ubuntu) using the image from Docker Store. You can see how easy and simple it is to have a Data Mart or Enterprise Data warehouse, up and running in few minutes.

1) Search Db2 Warehouse: The first step is to search for the Db2 Warehouse image on Docker Store. You can do a quick google search and it will show you the below.

2) Go to Docker Store by clicking on the search results link, that mentions Db2 Warehouse – Docker Store and you will see the page below:
https://store.docker.com/images/ibm-db2-warehouse-dev

3) Next, Click PROCEED TO CHECKOUT and enter using Docker credentials. If you don’t have a Docker ID, you can create one in less than two minutes.

4) On the checkout page, accept the license agreement and click “Get Content”. This will present you with the Docker Pull command along with broader documentation that has more details.


5) Taking care of Db2 Warehouse Prerequisites:
The key items are Docker Engine installation (Docker CE or EE) along with opening the firewall ports that are needed for the in-built monitoring capabilities.
https://www.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.doc/admin/local_prereqs-Linux.html
You might need to work with your Unix/Linux System administrator to complete some of the above steps. Plan accordingly.

6) Now go to the Linux machine, where you want to install Db2 Warehouse. Logon as “root” and run the “Docker Pull” command as shown below.
Keep in mind that you need to Docker logon first, else will receive an error such as “ Error response from daemon: pull access denied for store/ibmcorp/db2wh_ce, repository does not exist or may require ‘docker login’”

root@lingo1:~# docker login -u=miteshs -p=xxxxxx
WARNING! Using –password via the CLI is insecure. Use –password-stdin.
Login Succeeded
root@lingo1:~#
root@lingo1:~# docker pull store/ibmcorp/db2wh_ce:v2.7.0-db2wh_devc-linux

You can check the docker images by running the below command.

root@lingo1:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
store/ibmcorp/db2wh_ce v2.7.0-db2wh_devc-linux 5ffc805a633c 5 days ago 7.72GB

Alternatively, you can simply run the Docker RUN command, which will pull the image and install Db2 Warehouse in a single command. This will start the creation of Db2 Warehouse instance.

docker run -d -it –privileged=true –net=host –name=Db2wh -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 store/ibmcorp/db2wh_ce:v2.7.0-db2wh_devc-linux

7a) Next, you can monitor the setup using the following command. The next few screen shots, show the progress of the installation, which should take anywhere from 10-15 minutes for the SMP installation.

docker logs –follow Db2wh

7b) Installation validation: As you can see below, the installation is now completed succesfully. You can verify that by logging into the console (replace with the IP address of your machine)
https://host_IP_addres:8443/console/ibmblu/index_Customer.jsp#activeTask=bluhelixwelcome

Change password for the admin user (bluadmin). It is recommended to change the passwod on installation, using the following command:
docker exec -it Db2wh setpass

8) Connect to the Db2 Warehouse database using the command line:
root@lingo1:~# docker exec -it Db2wh clpplus bluadmin/@localhost:50000/bludb
CLPPlus: Version 1.6
Copyright (c) 2009, 2011, IBM CORPORATION. All rights reserved.
Database Connection Information :
———————————
Hostname = localhost
Database server = DB2/LINUXX8664 SQL110190
SQL authorization ID = bluadmin
Local database alias = BLUDB
Port = 50000

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Published on May 9, 2018
by Mitesh Shah, Product Manager, Hybrid Data Management Platform, IBM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mitesh Shah is the product manager for Hybrid Data Management platform of offerings, mainly Data Warehousing solutions, uniquely positioned for virtual private clouds and platforms that support Docker container technology. He has broad experience around various facets of software development along with business systems analysis, and program testing; known for ability to analyze complex issues with an analytical mindset, incubate and streamline innovative solutions, and promote a consensus-driven work environment that contributes to on-time and on-budget delivery. Throughout his career, Mitesh has enjoyed a focus on helping clients address their data management and solution architecture needs.

6 comments on"Db2 Warehouse on Linux Setup using Image from Docker Store"

  1. Hi Mitesh,

    Thank you for very nice example.

    Can you please share storage and filesystem configuration here. I’ve deployed db2 whs on CentOs without problem, but having some issues later. For example i don’t have after deployment directories bellow /mnt/clusterfs

    [root@dwh-db2whs ~]# ls -la /mnt/clusterfs/
    total 4
    drwxr-xr-x. 15 root root 243 May 24 15:44 .
    drwxr-xr-x. 3 root root 23 May 24 15:29 ..
    drwxr-xr-x. 4 root root 30 May 24 15:31 dashdb_spark
    drwxr-xr-x. 13 500 1003 185 May 24 15:32 db2
    drwxr-xr-x. 2 root root 24 May 24 15:39 downloads
    drwxr-xr-x. 5 500 1003 44 May 24 15:30 dsserver
    drwxrwxr-x. 2 5001 3000 128 May 24 15:31 global
    drwxr-xr-x. 4 root root 37 May 24 15:44 ha
    drwxr-xr-x. 8 root root 101 May 24 15:31 home
    drwxr-xr-x. 3 55 55 21 May 24 15:30 ldap
    -rw-r–r–. 1 root root 1873 May 24 15:29 options.json
    -rw-r–r–. 1 root root 0 May 24 15:40 .prepare_node.dwh-db2whs
    drwxrwxrwx. 2 root root 6 May 24 15:30 R-Install
    drwxrwxrwx. 3 root root 22 May 24 15:30 scratch
    drwxr-xr-x. 2 root root 6 May 24 15:44 sm
    drwxr-xr-x. 3 root root 186 May 24 15:44 SystemConfig
    drwxr-xr-x. 2 500 1003 47 May 24 15:44 tmp
    [root@dwh-db2whs ~]#

    This is the command I’ve used for docker run:
    root@dwh-db2whs~# docker run -d -it –privileged=true –net=host –name=Db2wh -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 store/ibmcorp/db2wh_ee:v2.7.0-db2wh-linux

    Also, tried to run one test backup:

    [root@dwh-db2whs ~]# docker exec -it Db2wh status
    Getting IBM Db2 Warehouse status…

    — IBM Db2 Warehouse Services Status —

    SUMMARY

    Db2TablesOnline : RUNNING
    Db2connectivity : RUNNING
    Db2running : RUNNING
    LDAPrunning : RUNNING
    WebConsole : RUNNING
    Spark : ENABLED
    LDAPsearch : SUCCESS
    * If the ‘LDAPsearch’ status in the output is SUCCESS, IBM Db2 Warehouse
    can access the LDAP server.

    **************** IBM Db2 Warehouse license information ****************
    * License type : Trial
    * License expiry date : 08/21/2018
    * Number of days remaining : 88
    * License status : Active
    ***********************************************************************

    [root@dwh-db2whs ~]# time docker exec -it Db2wh db_backup -path /tmp -type onl
    Performing System Health Check…
    ERROR: HA is RECOVERING. Cannot perform Backups and Restore.

    More Info: See /scratch/bluadmin_BNR/logs/backup20180525073610.log for details.

    real 0m1.498s
    user 0m0.020s
    sys 0m0.021s
    [root@dwh-db2whs ~]# less /scratch/bluadmin_BNR/logs/backup20180525073610.log
    /scratch/bluadmin_BNR/logs/backup20180525073610.log: No such file or directory
    [root@dwh-db2whs ~]#

    Do you have idea what i the problem?

    Thank you,
    Ivan

  2. Regarding missing directories after deployments – /mnt/bludata0 and /mnt/blumeta0 are missing after deployment.

    Tnx,
    Ivan

    • Hello Ivan – thanks for your question. We have a separate Db2 Warehouse forum (http://ibm.biz/Db2_Warehouse_Forum
      ) , where you can get community support and answers to your question. May I suggest that you post your questions up there.

  3. Rekha Nair May 29, 2018

    Hello Ivan,

    This is an example for Db2 Warehouse deployment. The db_backup command is specific for IIAS (IBM® Integrated Analytics System ) . Also, there is no /scratch folder in Db2 Warehouse https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.iias.admin.doc/doc/app_backup.html

    As far as /mnt/bludata0 and /mnt/blumeta0, are you seeing these folders are missing inside the container?

    1) Exec in to the container
    docker exec -it Db2wh bash

    2) Can you check if you can see /mnt/bludata0 and /mnt/blumeta0?

    Thanks,
    Rekha

  4. Hi Rekha,

    When I used the webconsole URL , it did not launch. I have all the services running. Not sure what the issue is. Any help is appreciated.

    Thanks,
    Vithal

    $ docker exec -it Db2wh status
    Getting IBM Db2 Warehouse status…

    — IBM Db2 Warehouse Services Status —

    SUMMARY

    Db2TablesOnline : RUNNING
    Db2connectivity : RUNNING
    Db2running : RUNNING
    LDAPrunning : RUNNING
    WebConsole : RUNNING
    Spark : ENABLED
    LDAPsearch : SUCCESS
    * If the ‘LDAPsearch’ status in the output is SUCCESS, IBM Db2 Warehouse
    can access the LDAP server.

    **************** IBM Db2 Warehouse license information ****************
    * License type : Trial
    * License expiry date : 09/24/2018
    * Number of days remaining : 88
    * License status : Active
    ***********************************************************************

  5. Norbert Bracke August 28, 2018

    Why am I not able to pull the container
    repository docker.io/store/ibmcorp/db2wh_ee not found: does not exist or no pull access.

Join The Discussion

Your email address will not be published. Required fields are marked *