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
  ID NAME             STATUS         PATH                          
   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.


I did all that you suggested, I could install the server, but every time that I try to connect to database I get:

SQL1042C  An unexpected system error occurred.

This is the db2diag.log

2004-12-17- I183499C335        LEVEL: Warning
PID     : 1098                 TID  : 225         PROC : java
INSTANCE: db2bwl               NODE : 000
FUNCTION: DB2 UDB, oper system services, sqloread, probe:60
MESSAGE : errno:
DATA #1 : Hexdump, 4 bytes
0xEFA7F1CC : 0000 0016                                  ....
2004-12-17- I183835C337        LEVEL: Warning
PID     : 1098                 TID  : 225         PROC : java
INSTANCE: db2bwl               NODE : 000
FUNCTION: DB2 UDB, oper system services, sqloclose, probe:110
MESSAGE : errno:
DATA #1 : Hexdump, 4 bytes
0xEFA7F1D4 : 0000 0009                                  ....
2004-12-17- I184173C327        LEVEL: Error
PID     : 1098                 TID : 225
FUNCTION: DB2 Common, OSSe, ossMemFree, probe:20
MESSAGE : ECF=0x900003EE The address provided is NULL
DATA #1 : String, 92 bytes
NULL pointer for memory allocation address found at: ../../../exec/src/clientCmd.C, line 362
2004-12-17- I184501C327        LEVEL: Error
PID     : 1098                 TID : 225
FUNCTION: DB2 Common, OSSe, ossMemFree, probe:20
MESSAGE : ECF=0x900003EE The address provided is NULL
DATA #1 : String, 92 bytes
NULL pointer for memory allocation address found at: ../../../exec/src/clientCmd.C, line 363

Probably I forgot something or this is another error. Could you please help me?



Posted by Claudia Gonzalez on December 17, 2004 at 01:17 PM EST #

What's your DB2 version? Do you have anything in /etc/system (global zone restrictions)? Also are you using any "restraints" on your zones (resource pools, processor limits?) The problem looks like coming from a custom client? Is that so? Is the client trying to access any kernel parameters or kmem structures? Anything that tries to query the kernel structures will typically fail in local zones.

Posted by Jignesh K. Shah on December 19, 2004 at 12:39 PM EST #

You may also want to know that that an entry for db2c_db2inst1 in /etc/services is also left out as part of the db2setup failing on Solaris 10. So this manual step is required along with the db2icrt command following the db2iutil update. Sudhir

Posted by Sudhir Mohith on January 08, 2007 at 06:47 AM EST #

Hi jignesh, As sysedf doesn't report the kernal param values like shmmax,shmmin etc., what is the alternative command to see those values which are set ? Thx

Posted by guest on July 06, 2007 at 12:39 AM EDT #

Hi Jignesh,

I dont know if its the same situation but, I had this situation,
OS solaris 10, DB2 V9.1 FP4a installed.
I got a situation to test some V7 migrations. I installed V7 in the same sever with Solaris10 .
when i was trying to create a instance I got an error "./db2icrt: pvalue: parameter null or not set".
I tried by commenting the line with sysdef in db2iutil script and created an instance sucessfully.
But i was wondering why did not I faced the same error while creating the instance with V9 DB2.

Let me know your comments.

Posted by Srinivas Somavarapu on April 16, 2008 at 11:49 AM EDT #

Hi Srinivas,

DB2 Team and Sun's ISV-E teams works together during latest development of DB2 on Solaris. The said problem was resolved once it was identified few years back in a fixpack of DB2 V8.1 in development then and also all new versions of DB2 in development and hence all versions above that will have the fix but not anything less than that version.

Hope this answers your question.

Posted by Jignesh Shah on April 16, 2008 at 01:17 PM EDT #

I installed DB2 9.5 Enterprise server on solaris 10 Sparc system. On some attempts during installation it took infine time to create sample database(part of db2fs).However in one of several attempts it got installed successfully.I guess Control center is not available for sparc clients.I couldn't locate db2cc command(even after logging from instance user).When I'm trying to connect the db from remote db2 client(control center) it fails to connect the remote server(sparc).

I would like to know do I need to tweak something to have control center working on SPARC system beacuse it would be too tedious for a user like me to shoot db2(sql) queries.


Posted by Manoj.Solanki on January 22, 2009 at 04:07 AM EST #

Post a Comment:
Comments are closed for this entry.

Jignesh Shah is Principal Software Engineer in Application Integration Engineering, Oracle Corporation. AIE enables integration of ISV products including Oracle with Unified Storage Systems. You can also follow me on my blog http://jkshah.blogspot.com


« June 2016