Problem(Abstract)
STMM errors "STMM unable to attach to shared memory" are seen in the db2diag.log while DB2 installation or downgrading activity,
Symptom
STMM error are seen while performing the following activities
1. Downgrading the DB2 version from V9.7 to V9.5
2. Installation of DB2 V9.7 exist on the server where there are instances of Version 9.5
The following STMM error can be seen in the db2diag.log
2012-03-07-11.14.54.251966+060 I21192E551 LEVEL: Error
PID : 25944 TID : 46912883386688PROC : db2sysc
INSTANCE: db2itest NODE : 000 DB : LRDB
APPHDL : 0-394 APPID: *LOCAL.DB2.120307101154
AUTHID : DB2ITEST
EDUID : 29 EDUNAME: db2stmm (LRDB)
FUNCTION: DB2 UDB, Self tuning memory manager, stmmAttachToShm,
probe:2656
MESSAGE : ECF=0x90000001=-1879048191=ECF_ACCESS_DENIED
Access denied
DATA #1 : String, 39 bytes
STMM unable to attach to shared memory.
Cause
1. In case of downgrading of DB2 this happens because of entries remaining in the /shm folder
2. In case of V9.7 installation this happens because there is no instance created at the time and STMM is not able to attach to the instance
Environment
AIX 6.1 and Linux
DB V 9.5 and DB2 V 9.7
Diagnosing the problem
In case of DB2 downgrade execute the below command to find the V9.7 entries
ls -al /dev/shm
Here should see the following named shared memory segment:
-rw------- 1 root pdxdb2 4096 2012-04-03 06:17 DB2_SELF_TUNING_MEMORY_MANAGER_CROSS_INSTANCE_SHARED_ MEMORY_SEGMENT
In case of V9.7 installation, execute the below command
db2greg -dump
db2greg -dump output :
-----------------------------------------------------------------------
sen-swcdbs1/edudata/db2inst1>db2greg -dump
V,DB2GPRF,DB2SYSTEM,sen-swcdbs1,/edusys/db2/V9.7,
V,DB2GPRF,DB2FCMCOMM,TCPIP4,/edusys/db2/V9.7,
S,DB2,9.7.0.3,/edusys/db2/V9.7,,,3,0,a,1303477081,4
V,DB2GPRF,DB2SYSTEM,sen-swcdbs1,/edusys/db2/V9.7/FP5,
S,DB2,9.7.0.5,/edusys/db2/V9.7/FP5,,,5,0,,1326094319,1
V,DB2GPRF,DB2FCMCOMM,TCPIP4,/edusys/db2/V9.7/FP5,
I,DB2,9.7.0.3,db2inst1,/edudata/db2inst1/sqllib,,1,0,/edusys/db2/V9.7,,
V,DB2GPRF,DB2INSTDEF,db2inst1,/edusys/db2/V9.7,
I,DB2,9.7.0.3,db2inst2,/edudata/db2inst2/sqllib,,1,0,/edusys/db2/V9.7,,
I,DB2,9.7.0.3,db2inst3,/edudata/db2inst3/sqllib,,1,0,/edusys/db2/V9.7,,
I,DB2,9.7.0.3,db2inst4,/edudata/db2inst4/sqllib,,1,0,/edusys/db2/V9.7,,
Resolving the problem
In case of downgrade, remove the remains from the /shm folder with the 'rm' command and restart the instance.
In case of V9.7 installation either create a test instance on the 9.7 version or remove the installation of 9.7 and restart the 9.5 instances.
Related information
收起