Install Db2

IBM Db2 is one of the largest and most sophisticated enterprise DBMS packages ever created. Db2 is a product of IBM, the company that invented SQL.    Db2 is a high quality, genuinely enterprise-class DBMS that is both well known and well respected.  However, Db2 has significant limitations, such as support for a limited number of coordinate systems, that make it inconvenient to use with Manifold as a data store for general purpose GIS work.

 

IBM provides Db2 in various editions, including a free edition called IBM Db2 for Developers, which we call Db2 for short in this documentation.   Despite the qualification "for Developers," Db2 for Developers may be deployed in production and other non-development uses and may be used at no charge, including commercial use if desired.  As IBM puts it, Db2 for Developers may be used for free with "no strings attached." This documentation, therefore, uses Db2 as an example.

 

The main page for Db2 downloads, including the free Db2 for Developers edition, at the time of this writing is at https://www.ibm.com/us-en/marketplace/ibm-db2-direct-and-developer-editions

 

The IBM blog page announcing "One Db2, no strings attached" is at https://www.ibmbigdatahub.com/blog/simplifying-db2-downloads-help-clients-and-developers-get-started

 

The above blog points to a "registration optional" download page which requires free registration and is confusing to navigate: https://www.ibm.com/analytics/us/en/db2/trials/

 

Tech Tip: Db2 is a highly sophisticated, enterprise class DBMS.  The Db2 topics in this documentation provide a very simplified installation that can be used to show how Manifold can connect to Db2.   Many aspects of real life Db2 deployment are not covered.  Db2 tends to be an overwhelmingly complex system for individuals new to DBMS.  MySQL is a better choice for individual users who are seeking a DBMS repository for their GIS data.

Db2 for Developers Limitations

Db2 for Developers is free,, but it does come with a three key limitations compared to other Db2 editions:

 

 

However, Db2 for Developers imposes no limit to the number of simultaneous users, and Db2 for Developers includes native spatial data support.   Db2 for Developers also includes a huge number of advanced features, as set forth in the above blog page: in-memory BLU acceleration, IBM pureScale, storage optimization, in-memory columnar technology, parallel vector processing, data-skipping, and much more.

 

As a practical matter, the above limitations will mean that for GIS use Db2 for Developers is limited primarily by the 100 GB limit on total storage size.  

Using Db2

This topic is the first step in a five topic sequence showing a complete installation and then utilization of Db2 for Developers from the very beginning, using a simplified approach intended to facilitate experimentation by individuals.  A full enterprise installation should be undertaken by experts, to insure all required security facilities are correctly configured.   The examples these topics show, especially in the last topic in the sequence, will be useful for working with an existing Db2 installation our organization may have.  

 

There is no requirement to install Db2 or any other DBMS for using Manifold.  Manifold includes as built-in capabilities everything you need to do Manifold.  In general, storing GIS data within Manifold .map project files will be faster, and will deliver higher performance with greater ease of use and more capabilities than storing GIS data within Db2 or some other DBMS.   

 

So why install or use Db2?  Manifold users often use Db2 or any other DBMS for three reasons:  

 

 

Disclaimer: These topics were accurate when written, using the versions of installation software indicated.  Third party packages can and do change, so this topic may be out-of-date.  It is provided as an example of how such installations can be approached.

 

Installing Db2 and readying it for use in typical installations involves five steps:

 

Install Db2

 

Open a Firewall Port for Db2

 

Create a Database in Db2

 

Install Db2 Client

 

Connect to Db2

 

This is the first topic in the above sequence of steps.

Download and Launch Db2 Installation Package

We are using a 64-bit Windows 10 server system on which we will install Db2, to which we have connected via Remote Desktop (RDP).  This entire topic was conducted on that machine via RDP.   Our Windows login used for RDP has Administrator rights.

 

The main page for different Db2 versions is at https://www.microsoft.com/en-us/sql-server/sql-server-editions-express  To download the Db2 for Developers installation package,, in the IBM Db2 Database column, in the Get Started row click on the Download the product link.  That leads to a page where we can register for the IBM developer network, a requirement for the free download.  IBM is respectful, totally professional, and won't spam us, so no worries about registering.  

 

The download we use for this installation is an approximately 1.16 GB file called v11.1_ntx64_dec.zip.   We extract that file into a folder called 11.1_ntx64_dec folder.   We drill down within that folder to the 11.1_ntx64_dec\SERVER_DEC\image folder within.  

 

Right-click on setup.exe and choose Run as administrator (never hurts...) to launch the DB2 Setup Launchpad program.

 

 

 

 

Click on Install a Product.   

 

 

 

 

The launchpad does not explicitly mention Db2 for Developers, but instead appears to install everything for subsequent configuration by license option files.  No worries!  We click Install New.

 

 

 

Click Next.

 

 

 

Who says IBM doesn't have a sense of humor?   The license agreement is blank.   We click the first I accept choice and then press Next.

 

 

Click Custom and press Next.   We must choose a Custom installation because the Spatial Extender option is not part of the Typical installation.

 

 

 

Click Install DB2 Server Edition on this Computer and press Next.

 

 

Expand the Server support heading by pressing the + box.  The illustration above shows the heading after expansion.

 

 

Click the down triangle in the Spatial Extender server support item, and choose This feature will be installed...

 

 

 

Press Next.

 

 

Choose languages desired and confirm the installation folder (using the default is a good idea), and press Next.

 

 

We have elected to autostart the IBM SSH server at system startup.  Press Next.   We do not use the IBM Secure Shell in these topics, but there seems to be no harm in starting it in case we might want to use it.

 

 

We accept defaults, and press Next.

 

 

We accept defaults, and press Next.

 

 

We provide a password for the db2admin user name.  In these examples, we use a password of 12345xy, which is an absurdly insecure password.  In real life, use a lengthy, complicated password.  Press Next.

 

 

Press Next.

 

 

Uncheck the option to send notifications.  In real life, our long-suffering database administrator will want to get email alerts. Press Next.

 

 

Uncheck Enable operating system security.  Press Next.   This is an important step to simplify administration when setting up experimental Db2 installations.  Administrators who have expert Windows permissions and Db2 skills may wish to enable operating system security.

 

 

We can copy all of the parameters from this dialog into a text file, to remind ourselves what we chose during installation.  Press Install to start the installation process.

 

 

 

The installation program runs for a while...

 

 

 

We see the above when installation has been accomplished.  We note the port number, 50000, the default port number for Db2.  Press Finish.

 

We have accomplished the raw installation of Db2, and we now have an operating Db2 server running on our machine.  

 

However, so far our Db2 installation only operates on the local machine on which it has been installed.  We have yet to alter our Windows Firewall configuration to allow use of Db2 through the network.   That comes next when we open a firewall port.

Next Steps

Continue this case study on installing Db2 with the Open a Firewall Port for Db2  topic.

Notes

Inconsistent Product Names - Different IBM pages use different nomenclature for the free edition of Db2 and whether the "b" is capitalized or not. More recent pages call it Db2 while older pages may call it DB2.  The IBM blog page cited at the beginning of this documentation calls the free edition Db2 for Developers  while other pages refer to a Db2 Developer Edition that is a comprehensive install of all Db2 versions, but for development use only, with a different name, Db2 Developer-C Edition for what in Manifold documentation and the IBM blog is called Db2 for Developers.  Go figure.   It is best to plan on Db2 for Developers limitations of 16 GB RAM, 4 CPU cores and 100 GB of total storage for free, "no strings attached" use.  

 

Limits on Simultaneous Users?  - Db2 does not limit the number of concurrent connections, but the Windows system on which it is installed may limit the number of concurrent connections.  For example, if we install Db2 on a Windows 10 machine we will be limited by Windows, and not by Db2, to a maximum of 20 connections.  If we install on a Windows Server machine we can have more connections.  

See Also

Schema

 

DBMS Data Sources - Notes

 

Project Pane

 

File - Create - New Data Source

 

Command Window

 

Real and Virtual Components

 

Install MySQL

 

Install SQL Server

 

Install PostgreSQL

 

Install Oracle

 

Open a Firewall Port for Db2

 

Create a Database in Db2

 

Install Db2 Client

 

Connect to Db2

 

Big List of Formats and Data Sources

 

Example: Switching between Manifold and Native Query Engines