'SQL1220N The database manager shared memory set cannot be allocated' error received, when running db2start command.

Technote (troubleshooting)


Problem(Abstract)

Cannot start DB2 instance after installation.

Symptom

SQL1220N

The database manager shared memory set cannot be allocated.

Cause

SQL1220N error can be seen under two conditions.


1. Instance_memory is set to hard value that is too high to be allocated.

$ db2 update dbm cfg using instance_memory 100000000

    DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed successfully.

$ db2start
    06/13/2012 11:38:38 0 0 SQL1220N The database manager shared memory set cannot be allocated.
    SQL1032N No start database manager command was issued. SQLSTATE=57019

Following messages will be seen in the db2diag.log file:

    2012-06-13-11.40.46.358205-300 E3847E377 LEVEL: Severe
    PID : 18511 TID : 46912687594032PROC : db2star2
    INSTANCE: db2inst1 NODE : 000
    FUNCTION: DB2 UDB, base sys utilities, DB2StartMain, probe:372
    MESSAGE : ZRC=0xFFFFFB3C=-1220
    DATA #1 : <preformatted>
    INSTANCE_MEMORY setting of 100000000 cannot exceed physical memory limit of 479175
    .
    .
    2012-06-13-11.40.46.418756-300 I4890E297 LEVEL: Event
    PID : 18509 TID : 46912687592736PROC : db2start
    INSTANCE: db2inst1 NODE : 000
    FUNCTION: DB2 UDB, base sys utilities, sqleIssueStartStop, probe:190
    DATA #1 : <preformatted>
    Single node stopped [-1032]


2. This error can be seen even if the instance memory is already set to automatic. For example if the privileged value of zone.max-locked-memory is explicitly set in the operating system by the system administrator, then the same error can be seen during db2start. By default this is not set in the operating system.

$ db2start
    SQL1220N The database manager shared memory set cannot be allocated.SQL1032N No start database manager command was issued. SQLSTATE=57019

Following message will be seen in the db2diag.log file:
    2012-03-19-15.52.22.902439+330 I3553A398 LEVEL: Severe
    PID : 21472 TID : 1 PROC : db2star2
    INSTANCE: db2inst1 NODE : 000 EDUID : 1
    FUNCTION: DB2 UDB, base sys utilities, DB2StartMain, probe:350
    MESSAGE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
    "No Storage Available for allocation"
    DIA8305C Memory allocation failure occurred.

Diagnosing the problem

Check the dbm cfg for the instance setting instance_memory, and see if it is set to automatic, use this command:


db2 get dbm cfg | grep -i instance_memory

    Size of instance shared memory (4KB) (INSTANCE_MEMORY) = AUTOMATIC
    If it is set to automatic proceed with the below steps. If it is set to a hard coded value then proceed to resolving the problem.

Check for zone.max-locked-memory capping. zone.max-locked-memory using this command:

prctl `echo $$`
    privileged 4.00GB - deny system 16.0EB max deny

Resolving the problem

Set the dbm cfg INSTANCE_MEMORY value to AUTOMATIC by issuing the following command from a DB2 Command Window as the instance owner:


db2 update dbm cfg using INSTANCE_MEMORY AUTOMATIC

Once this is done, then attempt to start your instance.
 

If INSTANCE_MEMORY is already set to automatic and you encounter the error again. Then either remove the capping from zone.max-locked-memory; or work with your system administrator to set the privileged limit for "zone.max-locked-memory" high enough for DB2 to start.



For further discussion on this topic, visit this developerWorks forum thread:
https://www.ibm.com/developerworks/community/forums/html/topic?id=2ac7e110-e9f9-4d7a-a121-202971996eed

Related information

More information on INSTANCE_MEMORY
SQL1220N error message

Cross reference information
Segment Product Component Platform Version Edition
Information Management DB2 Connect

Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

9.1, 9.5, 9.7, 10.1

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Software edition:

Advanced Enterprise Server, Enterprise Server, Personal, Workgroup Server

Reference #:

1396245

Modified date:

2013-07-08

Translate my page

Machine Translation

Content navigation