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:
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.
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.
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)
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/
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.