Monday, August 30, 2004

DB2 working under Solaris 10 Zones

(UPDATE ON MARCH 13, 2007: This entry is more than two years old please refer to the new entry for more information on DB2 V8.2 in Solaris 10 Zones )

DB2 on Solaris

NOTE: Following is not an offical supported configuration yet.

I finally got around to try DB2 V8.1 on Solaris 10 Zones (global zone as well as local Zone) using build 62.

# uname -a
SunOS testbed 5.10 s10_62 sun4u sparc SUNW,Ultra-5_10
# zoneadm list -iv
4 testbed running /

Generally you have to first use db2osconf to get the right kernel parameters to create a DB2 instance, add them to /etc/system and then reboot the system. However since the kernel parameters have changed a lot in Solaris 10 (all for better), I did not use db2osconf and blindly put them into /etc/system. Anyway for my test I did not modify the /etc/system at all. (Plus db2osconf won't work in local zone anyway since the concept of modifying kernel parameters does not apply to localzones.)

I used the command line install of DB2 V8.1. The Install of DB2 succeeds, however when I used db2icrt to create instance it failed with the following error:

DBI1030E Kernel parameter MSGMAX must be set to 65535

One of DB2 instance creation script probes using 'sysdef' to get the value of MSGMAX and MSGMNB kernel parameters. Unfortunately in Solaris 10 these values are not tunable throught /etc/system and it defaults to 65535. Also sysdef no longer reports these values as they are not tunables anymore. (Many of these resource control paramters are now process specific) The script therefore fails in Solaris 10 (global-zone or local-zone)

So I open /opt/IBM/db2/V8.1/instance/db2iutil script using my favorite editor (vi) and search for 'sysdef' in it, modify it such that if does not find MSG* kernel parameter in the sysdef output it should not fail and continue. Also the default value of these parameters not found in sysdef (MSGMAX,MSGMNB) should be 65535 instead of zero. I modify these default values (I am working with IBM Toronto Labs and it will be resolved in a later fixpack hopefully) and saved the script file (as root) (Remember!!! Always make a backup copy :-) )

Once I rectify db2iutil, the related db2icrt scripts works under global-zone as well as local-zone. And then I went on to use Control Center, Sample database, etc and everything seems to work fine. If you are more interested in DB2 on Solaris features let me know and I will put out more blog entries on it.

Post a Comment