DB2 – Leader, Master and Manager

In DB2 pureScale, we use a RSCT peer domain and a GPFS domain. These domains have couple of machines networked together. In democracy, we choose someone to be a leader / master / manager to create an order. The same type of democracy exists in RSCT and GPFS where the...

DB2 10.1 pureScale and RSCT logs

The GPFS logs are in /var/adm/ras and RSCT logs are in /var/ct/<db2domainname>log/mc directory. If you are lazy like me, create an alias in your profile to change the directory alias rlog='cd /var/ct/db2domain*/log/mc' The directory structure looks like:...

DB2 10.1 GPFS and Fast I/O Fencing

Useful commands for day to day work to manage DB2 pureScale with RSCT and GPFS GPFS: Did you wonder why GPFS commands start with mm? The GPFS started as a IBM research project the the early 90s to build a multi-media (music and video) networked file system for some...

DB2 10.1 pureScale and RSCT

Before Install DB2 10.1 pureScale feature uses RSCT, GPFS and Tivoli SA MP which is an application of RSCT. A DB2 DBA can take care of DB2 but there are additional things one must take care particularly on RSCT. In using DB2 pureScale, one is going from a stand alone...

Poor Man SAN

The open source iscsitarget provides a great way to do SAN on a laptop using VMware. This is good for testing and learning purposes. We use iscsitarget to export devices so that we can use them for the shared database by multiple hosts in a DB2 pureScale environment....

DB2 10.1 HADR

Scott Hayes, CEO of DBI gave me the opportunity to do the IBM DB2 10.1 HADR Presentation on his DB2 Night Show. Follow this link: http://www.dbisoftware.com/blog/db2nightshow.php?id=372

DB2 pureScale and SCSI-3 PR

DB2 10.1 pureScale requires an optional but highly recommended SCSI-3 PR capable storage. DB2 10.1 pureScale requires a mandatory tie breaker disk which should be SCSI-3 PR capable. Optionally, you can configure an IP address to be a tie-breaker disk but this is not...

Cloning VM when DB2 is on

In today's virtualized environment, it is easier to clone a virtual machine from an existing one. When DB2 is already installed with Tivoli SA MP for high availability, we need to also make sure that each host has a unique node id otherwise HA configuration will...

BGInfo for Linux

If you are spoiled using BGInfo of Windows to show some useful information on your desktop, you may try this poorly written but working script that does the same thing. This was written for SuSe Linux but can be adapted for other distribution. If you happen to make...

Generate and copy /etc/hosts file to all hosts

The scripts that I am sharing are used to do the DB2 pureScale install on 'n' number of hosts. One of the issue is to have consistent /etc/hosts file on all nodes. The input file is ip.txt similar to the previous posts.   Script to generate and copy hosts...
Set up passwordless SSH between hosts

Set up passwordless SSH between hosts

If you need to set up a passwordless SSH between multiple hosts, you can try the following script to do it automatically for you rather than manually copying the keys from one hosts to another. The script needs an input file ip.txt that has server information for all...

SQL Monitoring from the Stored Procedure

You can monitor dynamic SQL statements by using SYSIBMADM.TOP_DYNAMIC_SQL view but you need an event monitor to monitor SQL statements inside a DB2 Stored Procedures as those statemets are static in nature. Let us understand this through a simple exercise: Step-A:...

How to use port 80 in Optim Performance Manager 5.1

The default port to use Optim Performance Manager for web console is 55000 and 55001 for SSL. This requires opening up 55000 through firewall and what if you want to use port 80 on the OPM Server. It is little tricky since OPM Web Console runs as non-root user and...

Equivalent of Oracle KEEP function in DB2

Equivalent of Oracle KEEP can be in DB2 using a nested query OVER (PARTITION BY ..) and then using MAX and MIN on top of it without having any extra sort. It is best explained by an example: Case-1: Oracle query using KEEP function: CREATE TABLE emp(id INTEGER, name...

Restart IDENTITY Column when data is migrated to DB2

If a table is created with an IDENTITY column and you need to make sure that your identity column starts from the last max value that you load the data. IBM Data Movement Tool does this automatically but if you are not using the tool and want a way to sync up start...

DB2 Control Center Code Page

If you are using DB2 Control Center on Windows and wondering how to set the code page of your choice, follow these steps. Open a DB2 command window: C:\>SET DB2CODEPAGE=1208 C:\>db2cc The first command sets the environment variable DB2CODEPAGE to 1208 (UTF-8) and...