IBM Support

SQL1220N when attempting to start a DB2 instance

Troubleshooting


Problem

This document provides troubleshooting methods for when you attempt to start an instance (db2start) and encounter the following error: SQL1220N The database manager shared memory set cannot be allocated.

Symptom

During the creation of a new instance, the db2start command might fail with the following message:

06/02/2005 11:45:48 0 0 SQL1220N The database manager shared memory set cannot be allocated.
SQL1032N No start database manager command was issued. SQLSTATE=57019
DB2® was unable to allocate its shared memory set.

Cause

One possibility is that the file sqllib/.ftok is not created during the creation of the instance.

Diagnosing The Problem

You might see the following messages in the db2diag.log file when using DB2 for Linux, UNIX and Windows Version 9.7 Fix Pack 5 (you might not see all these messages in other DB2 releases or fix pack levels):

2012-04-02-11.43.12.833691-240 I1825A313          LEVEL: Event
PID     : 23068710             TID  : 1           PROC : db2start
INSTANCE: db2inst             NODE : 000
EDUID   : 1
FUNCTION: DB2 UDB, base sys utilities, sqleIssueStartStop, probe:21
DATA #1 : <preformatted>
Single node instance [0] is starting
...
2012-04-02-11.43.13.008048-240 I3785A468          LEVEL: Error
PID     : 22872310             TID  : 1           PROC : db2star2
INSTANCE: db2inst             NODE : 000
EDUID   : 1
FUNCTION: DB2 UDB, SQO Memory Management, sqloAllocateSharedMemory, probe:2000
MESSAGE : ZRC=0x870F00B4=-2029059916=SQLO_NO_INSTANCE "No instance available."
DATA #1 : String, 44 bytes
Error generating ftok key for shared memory.
DATA #2 : Memory set type, PD_TYPE_SET_TYPE, 4 bytes
0
...
2012-04-02-11.43.13.009180-240 I4581A341          LEVEL: Severe
PID     : 22872310             TID  : 1           PROC : db2star2
INSTANCE: db2inst             NODE : 000
EDUID   : 1
FUNCTION: DB2 UDB, base sys utilities, DB2StartMain, probe:3
DATA #1 : Hexdump, 4 bytes
0x0FFFFFFFFFFF9804 : FFFF FB3C                                  ...<
...      

2012-04-02-11.43.13.017900-240 I5264A306          LEVEL: Event
PID     : 23068710             TID  : 1           PROC : db2start
INSTANCE: db2inst             NODE : 000
EDUID   : 1
FUNCTION: DB2 UDB, base sys utilities, sqleIssueStartStop, probe:190
DATA #1 : <preformatted>
Single node stopped [-
1220].

Resolving The Problem

A quick work-around is to use the executable db2ftok (found in sqllib/bin) to create a new seed file sqllib/.ftok. To generate the new .ftok file based on the current time and other information, run the command ~/sqllib/bin/db2ftok.

When starting the instance, the DB2 software reads the .ftok file and creates a standard interprocess communication key (IPC key) which is later supplied to other subroutines for memory allocation.

After the .ftok file is created, issue the db2start command again.

Note: In order to determine the reason why the .ftok file is absent in your particular environment, contact DB2 Universal Database™ (DB2 UDB) Support and submit a problem record.

Also note that a missing .ftok file is not the only cause of the SQL1220N error.

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database Objects\/Config - Instance","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF027","label":"Solaris"}],"Version":"9.7;9.5;9.1","Edition":"Enterprise","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21217932