Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Sep 2013
    Posts
    34

    Unanswered: SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Hi ,

    I have installed db2 9.1 on solaris 5.10. Its installed successfully.

    Then set the kernel parameter as recommended by db2osconf utility:

    set msgsys:msginfo_msgmni = 2560
    set semsys:seminfo_semmni = 3072
    set shmsys:shminfo_shmmax = 2862622310
    set shmsys:shminfo_shmmni = 3072

    After rebooting the system i created instance, DAS , then created the db .

    Then i have restored the db from the backup file which is from different system having same db2 version and same OS. Restored the db successfully.
    But while connecting to the db i got below error:

    db2 connect to $DBNAME
    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019


    Diag error:
    I162286A485 LEVEL: Severe
    PID : 881 TID : 1 PROC : db2agent ($DB) 0
    INSTANCE: NODE : 000
    APPHDL : 0-8 APPID: *LOCAL.db2inst1.130920093837
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, base sys utilities, sqleFirstConnect, probe:20
    RETCODE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
    "No Storage Available for allocation"
    DIA8305C Memory allocation failure occurred.


    Can anyone Please guide me where i was wrong in installing the steps.

    Please reply
    Last edited by Pra; 09-20-13 at 06:47. Reason: word missing

  2. #2
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    Smile shared memory

    This error means that the memory allocated for DB2 is not enough. So we need to allocate more memory.
    To identify the amount of memory allocated for db2, we need to use the following command, ipcs -l it showed the following


    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 262144
    max total shared memory (kbytes) = 15099492
    min seg size (bytes) = 1

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

    ------ Messages: Limits --------
    max queues system wide = 1675
    max size of message (bytes) = 65535
    default max size of queue (bytes) = 65535


    Note the thing I've bolded.(Its 256mb now) It should be increased.
    To do this I had to edit /etc/sysctl.conf
    I had to add the following.


    kernel.sem=250 256000 32 1024
    #Example shmmax for a 32-bit system
    kernel.shmmax=1073741824
    #Example shmall for 90 percent of 16 GB memory
    kernel.shmall=3774873
    kernel.msgmax=65535
    kernel.msgmnb=65535


    Changing it to 1gb.
    Type in sysctl -p to activate the changes done.
    It dint work still..

    Now the ipcs -l had the following output.


    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 1048576
    max total shared memory (kbytes) = 15099492
    min seg size (bytes) = 1

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

    ------ Messages: Limits --------
    max queues system wide = 1675
    max size of message (bytes) = 65535
    default max size of queue (bytes) = 65535


    Note the max number of segments. It remains unchanged.
    We need to change it also.
    So, I had to add an extra parameter. kernel.shmmni, which is used to change the number of segments.
    Now my /etc/sysctl.conf had the following added content.


    kernel.sem=250 256000 32 1024
    #Example shmmax for a 32-bit system
    kernel.shmmax=1073741824
    kernel.shmmni=10000
    #Example shmall for 90 percent of 16 GB memory
    kernel.shmall=3774873
    kernel.msgmax=65535
    kernel.msgmnb=65535


    ipcs -l had the following output.


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

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

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


    To activate the changes made, you need to type in the command sysctl -p

    Now I connected to the database using connect to databasename

  3. #3
    Join Date
    Sep 2013
    Posts
    34

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Hi

    i have set following kernel parameters in /etc/system file on solaris

    But still getting the same error while connecting to db

    set msgsys:msginfo_msgmax = 65535
    set msgsys:msginfo_msgmnb = 65535
    set msgsys:msginfo_msgmni = 7168
    set msgsys:msginfo_msgtql = 7168
    set msgsys:msginfo_msgssz = 16
    set msgsys:msginfo_msgseg = 32767

    set semsys:seminfo_semmni = 8192
    set semsys:seminfo_semmns = 17204
    set semsys:seminfo_semmnu = 8192
    set semsys:seminfo_semume = 240
    set semsys:seminfo_semmap = 1026
    set semsys:seminfo_semopm = 200
    set semsys:seminfo_semmsl = 200
    set semsys:seminfo_semvmx = 32767

    set semsys:seminfo_semmap = 1026
    set semsys:seminfo_semopm = 200
    set shmsys:shminfo_shmmax = 30074587545
    set shmsys:shminfo_shmmax = 15037293773
    set shmsys:shminfo_shmmni = 8192
    set shmsys:shminfo_shmseg = 240
    set shmsys:shminfo_shmmin = 1


    Please suggest.

  4. #4
    Join Date
    Sep 2013
    Location
    India
    Posts
    246
    Please post the output of following command

    ipcs -l

    cheers

  5. #5
    Join Date
    Sep 2013
    Posts
    34

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Hi

    ipcs -l is not working on solaris.

    so similar command is ipcs -J

    Here is the output

    IPC status from <running system> T ID KEY MODE OWNER GROUP PROJECT
    Message Queues:
    q 29 0x43b1b2ff --rw------- db2inst1 db2iadm1 default
    q 28 0x340af5e5 -Rrw------- db2inst1 db2iadm1 default
    q 25 0x8c9cb677 --rw-rw-r-- db2inst1 db2iadm1 default
    q 24 0x8c9cb672 -Rrw-rw--w- db2inst1 db2iadm1 default
    q 23 0x8c9cb671 -Rrw-rw--w- db2inst1 db2iadm1 default
    q 22 0 -Rrw------- db2inst1 db2iadm1 default
    q 21 0 --rw------- db2fenc1 db2fadm1 default
    q 20 0 -Rrw------- db2inst1 db2iadm1 default
    q 19 0 -Rrw------- db2inst1 db2iadm1 default
    q 18 0 --rw------- db2inst1 db2iadm1 default
    q 17 0 --rw------- db2inst1 db2iadm1 default
    q 15 0 --rw------- db2inst1 db2iadm1 default
    q 2 0x39d698e --rw------- db2inst1 db2iadm1 default
    q 1 0x420cbb90 -Rrw------- db2inst1 db2iadm1 default
    Shared Memory:
    m 2 0 --rw------- db2fenc1 db2fadm1 default
    m 1 0x8c9cb661 --rw------- db2inst1 db2iadm1 default
    m 0 0x8c9cb674 --rw-rw-rw- db2inst1 db2iadm1 default
    Semaphores:
    s 15 0 --ra-ra---- db2inst1 db2iadm1 default
    s 13 0x8c9cb769 --ra-ra---- db2inst1 db2iadm1 default
    s 12 0 --ra-ra-ra- db2fenc1 db2iadm1 default
    s 10 0 --ra-ra---- db2inst1 db2iadm1 default
    s 9 0 --ra-ra---- db2inst1 db2iadm1 default
    s 8 0 --ra-ra---- db2inst1 db2iadm1 default
    s 7 0x8c9cb673 --ra-ra-ra- db2inst1 db2iadm1 default
    s 6 0 --ra-ra---- db2inst1 db2iadm1 default
    s 5 0 --ra-ra---- db2inst1 db2iadm1 default
    s 4 0 --ra-ra---- db2inst1 db2iadm1 default
    s 3 0 --ra-ra---- db2inst1 db2iadm1 default
    s 2 0 --ra-ra---- db2inst1 db2iadm1 default
    s 0 0x8c9cb674 --ra-ra-ra- db2inst1 db2iadm1 default
    bash-3.00#

  6. #6
    Join Date
    Sep 2013
    Location
    India
    Posts
    246
    Seems you are lacking system memory..


    You need to set param
    kernel.msgmni=1024 (according to your memory)
    also you need to check the default size of Bufferpool/etc should not be so high at database level. (check them after activating db).


    good luck


  7. #7
    Join Date
    Sep 2013
    Posts
    34

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Changed that parameter and as m not able to connect to db , buffer pool parameter is not able to change.

    But before restore the database that that paramater was 800.


    Please suggest what to do?

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    sql1084c means db shared memory can't be allocated. How much RAM and swap does this server and the server where you took the backup have?

    First thing to check/compare is the following kernel parameter:
    set shmsys:shminfo_shmmax = 2862622310

    This parameter should be at least as high as the db shared memory db2 is trying to allocate (you should see a message in the db2diag that tells you how much db2 is trying to allocate - if db2 can't allocate the real bufferpools, it will retry with the hidden bufferpools).


    If you can't get it fixed, please execute the following:

    db2diag -A
    db2 connect to $DBNAME


    Attach db2diag.log here

  9. #9
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    Have you checked user limits for the instance owner?

    How much memory does your database require?

    What's the output of:
    db2pd -osinfo
    ?
    Regards,
    Mark.

  10. #10
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    shared memory

    it may happen that system where u take backup has more memory allocation to db, which db is not able to allocate at restored plateform.

    share your diaglog error message with OS memory details

    cheers.

    ssumit

  11. #11
    Join Date
    Sep 2013
    Posts
    34

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Hi,

    Following is the output:

    db2pd -osinfo

    Operating System Information:

    OSName: SunOS
    Version: Generic_118833-33
    Release: 5.10
    Machine: sun4u

    CPU Information:
    TotalCPU OnlineCPU ConfigCPU Speed(MHz) HMTDegree Cores/Socket
    2 2 2 1280 1 1

    Physical Memory and Swap (Megabytes):
    TotalMem FreeMem AvailMem TotalSwap FreeSwap
    3072 2389 n/a 26000 26000

    Virtual Memory (Megabytes):
    Total Reserved Available Free
    29072 n/a n/a 28389

    CPU Load Information:
    Short Medium Long
    0.040000 0.130000 0.090000


    Diag.log:



    2013-09-21-11.23.00.150919+330 I59660A765 LEVEL: Severe
    PID : 1075 TID : 1 PROC : db2agent (FDXDB) 0
    INSTANCE: db2inst1 NODE : 000
    APPHDL : 0-9 APPID: *LOCAL.db2inst1.130921055258
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, base sys utilities, sqleFirstConnect, probe:1718
    MESSAGE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
    "No Storage Available for allocation"
    DIA8305C Memory allocation failure occurred.
    DATA #1 : String, 202 bytes
    Failed to allocate the minimum possible database shared memory set.
    There is insufficient system resources to allocate the database
    shared memory set.
    Minimum database shared memory set size is (bytes):
    DATA #2 : unsigned integer, 8 bytes
    7504723968

    2013-09-21-11.23.00.161690+330 I60426A485 LEVEL: Severe
    PID : 1075 TID : 1 PROC : db2agent (DB) 0
    INSTANCE: db2inst1 NODE : 000
    APPHDL : 0-9 APPID: *LOCAL.db2inst1.130921055258
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, base sys utilities, sqleFirstConnect, probe:20
    RETCODE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
    "No Storage Available for allocation"
    DIA8305C Memory allocation failure occurred.

    /etc/system:
    set msgsys:msginfo_msgmax = 65535
    set shmsys:shminfo_shmmax = 2862622310
    set msgsys:msginfo_msgmnb = 65535
    set msgsys:msginfo_msgssz = 32
    set msgsys:msginfo_msgseg = 32767
    set msgsys:msginfo_msgmap = 2562
    set msgsys:msginfo_msgmni = 2560
    set msgsys:msginfo_msgtql = 2560
    set semsys:seminfo_semmni = 3072
    set semsys:seminfo_semmns = 16384
    set semsys:seminfo_semmnu = 3072
    set semsys:seminfo_semmsl = 256
    set semsys:seminfo_semvmx = 32767
    set semsys:seminfo_semume = 800
    set semsys:seminfo_semopm = 100
    set semsys:seminfo_semmnu = 2048
    set semsys:seminfo_semmap = 1026
    set shmsys:shminfo_shmseg = 1024
    set shmsys:shminfo_shmmni = 1024
    set semsys:seminfo_semaem = 16384
    set noexec_user_stack=1
    set rlim_fd_cur=1024
    set shmsys:shminfo_shmmin = 1

    kernel parameter set according to recommendation.

    db shared memory on before restoration:COMPUTED(251392)


    now i am not able to see this parameter as not able to connect to db after restoration.

    db shared memory on backup db: COMPUTED(2564832)

    can you please tell me which parameter i have to increase or change and how to calculate db shared memory according to system resources.

    As db shared memory parameter is set computed then it should allocate automatically.

    Please suggest me the detailed steps.

  12. #12
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    You are trying to make a database with more than 7GB memory requirements work on 3GB RAM server? Isn't this a mistake?
    Code:
    Minimum database shared memory set size is (bytes):
    DATA #2 : unsigned integer, 8 bytes
    7504723968
    Code:
    Physical Memory and Swap (Megabytes):
    TotalMem FreeMem AvailMem TotalSwap FreeSwap
        3072    2389      n/a     26000    26000
    If this is not a mistake, you should reduce memory requirements for your database.
    Try to forcibly reduce all bufferpool sizes by:
    Code:
    db2set DB2_OVERRIDE_BPF=5000
    db2stop
    db2start
    db2 connect to FDXDB
    If it doesn't help you can try to reduce other database memory consumers like UTIL_HEAP_SZ, etc...
    Regards,
    Mark.

  13. #13
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    shared memory

    I agree with mark..


    Bytes 7504723968 ( 7157 MB) trying to allocate db shared memory

    availible physical memory (2389 MB ) 2505048064 Bytes

    Your db param for shared memory is not configured properly

    You have only 2.2 GB memory but trying to allocate about 7 GB

    additionally..

    Don’t forget to unset DB2_OVERRIDE_BPF

    optionally you may tune your relevent kernel params using db2 on Solaris utility

    $DB2DIR/bin/db2osconf

    it will give you recomended values..

    cheers

  14. #14
    Join Date
    Sep 2013
    Location
    India
    Posts
    246

    shared memory

    forget to complete in earlier post

    Don’t forget to unset DB2_OVERRIDE_BPF after you connected to db once...

  15. #15
    Join Date
    Sep 2013
    Posts
    34

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    I have done following steps:

    db2set DB2_OVERRIDE_BPF=5000

    db2 db2stop force

    db2 db2start.

    And i am not able to change db cfg parameter as it gives error that db connection does not exist and while connecting gives error that

    SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

    Also i have already set kernel parameter which is recommended through db2osconf utility. So how can i change the db cfg parameter?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •