I have installed IBM DB2 10.5.5 and I want to create a new database there.

When I entered command

db2 create database test1

I am getting a error saying

SQL1084C  The database manager failed to allocate shared memory because an 
operating system kernel memory limit has been reached.  SQLSTATE=57019

Following is the output I get when I run "ipcs -l"

 ------ Shared Memory Limits --------
max number of segments = 10000
max seg size (kbytes) = 4882812
max total shared memory (kbytes) = 33554432
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 4096
max semaphores per array = 250
max semaphores system wide = 1024000
max ops per semop call = 32
semaphore max value = 32767

------ Messages Limits --------
max queues system wide = 16384
max size of message (bytes) = 65536
default max size of queue (bytes) = 16384

What is the reason for this? How can I fix it? I am running on Ubuntu 14.04 with 8GB physical memory.

  • 2
    You'll need to look at the diagnostic log (db2diag.log) for, well, diagnostics. Truncate the log (run db2diag -A) then try your create db command. The top of the log will show the actual kernel parameters in effect.
    – mustaccio
    Feb 12, 2016 at 13:24
  • Content in db2diag is available at gist.github.com/cdwijayarathna/0031210319f7cda8f86c Feb 12, 2016 at 14:40
  • Why don't you include the relevant parts here?
    – mustaccio
    Feb 12, 2016 at 15:12
  • 1
    Show the result of db2 get dbm cfg show detail | grep INSTANCE
    – mustaccio
    Feb 12, 2016 at 15:18
  • chamila@chamila-ThinkPad-T540p:~$ db2 get dbm cfg show detail | grep INSTANCE Global instance memory (4KB) (INSTANCE_MEMORY) = 50000 50000 Feb 15, 2016 at 3:45

2 Answers 2


I just had the same problem! In my case the problem was just the memory of the DB2 instance.

In windows type:

db2 get dbm cfg | findstr MEMORY

In linux:

db2 get dbm cfg | grep MEMORY

You will get something like that:

Global instance memory (4KB)          (INSTANCE_MEMORY) = 500000

The solution in my case was simply set the same threshold value but by activating the automatic mode:

db2 update dbm cfg using INSTANCE_MEMORY 100000 automatic immediate

The command "immediate" apply the settings now without the need to restart the instance. So if you get the settings again will have:

Global instance memory (4KB)          (INSTANCE_MEMORY) = AUTOMATIC(5000000)

Now try to connect to your database again. I believe that will again connect normally.

According to the DB2 documentation:

This parameter specifies the maximum amount of memory that can be allocated for a database partition if you are using DB2® database products with memory usage restrictions or if you set it to a specific value. Otherwise, the AUTOMATIC setting allows instance memory to grow as needed.

Font: IBM Knowledge Center


First check the memory limits in the output of

ulimit -a

as the instance owner and increase them if necessary.

Then just simply check the output of


I can see that you have sufficient physical memory but there is no proof that there is enough FREE memory for db2 to do its job.

And the most general, almost rtfm but inevitable hint is to read what

db2 '?' SQL1084C

Usually that is the minute when one slaps his/her forehead and self-miscalling words are heard.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.