Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: When executing db2start: "The database manager shared memory set cannot be allocated"

    Hi,
    on 32-bit Linux computer running DB2 v9.5 Express-C I rebooted computer and after reboot I tried to manualy start DB2 database by executing command: db2start

    I got error:
    Code:
    SQL1220N  The database manager shared memory set cannot be allocated.
    From manual:
    Code:
    SQL1220N  The database manager shared memory set cannot be allocated.
    
    Explanation: 
    
    The database manager could not allocate its shared memory set. The cause
    of this error may be insufficient memory resources either for the
    database manager or the environment in which its operation is being
    attempted. Memory resources that can cause this error include: 
    *  The number of shared memory identifiers allocated in the system
    *  The size of the shared memory segment
    *  The amount of paging or swapping space available in the system
    *  The amount of physical memory available in the system
    
    User response: 
    
    One or more of the following: 
    *  Validate that sufficient memory resources are available to satisfy
       the database manager's requirements, and those of the other programs
       running on the system.
    *  On Linux 32-bit, increase the kernel parameter shmmax to 256 MB. On
       Linux 64-bit, increase the kernel parameter shmmax to 1GB.
    *  Reduce database manager's memory requirement for this memory set by
       reducing the database manager configuration parameters which affect
       it. These are: fenced_pool and, numdb.
    *  Where appropriate, stop other programs using the system.
    Any idea what is wrong?

    Thanks,
    Grofaty

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Did you check this out?

    * On Linux 32-bit, increase the kernel parameter shmmax to 256 MB. On
    Linux 64-bit, increase the kernel parameter shmmax to 1GB.

    I would get a copy of the Up and Running on DB2 9.5 for Linux redbook on the IBM website. They have some good info on how to change these kernel parms.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    Marcus_A,
    first to explain why the problem appeared:
    1. I have moved /home directory from one disk ext3 partition to new partition. Directory /home/db2inst1 is home dir for db2inst1 user and default storage for my database on test computer.

    2. I have moved /home/ directory as described in tutorial (section Using the new partition) http://www.psychocats.net/ubuntu/separatehome, but instead of
    "find . -depth -print0 | sudo cpio --null --sparse -pvd /new/" command I used "mv /old/home/ /new/", because find command totaly corrupts file permissions. All other commands I have used the same as in tutorial

    3. But when I have rebooted Linux and I try to startup the DB2 I got error "SQL1220N The database manager shared memory set cannot be allocated" - strange error for changing disk files from one partition to another. But as I see other things have been corrupted also like db2set environment is not set correctly - got currupted (DB2COMM=TCPIP has dissapeared).

    4. But funny think just for fun I have moved /home dir back to original partition and rebooted Linux and DB2 is working without any problem.

    Now I am wondering why does DB2 reports "memory errors" and why db2set command is not set after first move of /home dir? I was convinced that moving directories between disk partitions should not effect DB2 at all. Does DB2 store some internal disk structures or something like that? Why does DB2 reports such an errors?

    P.S. I know I can move database to new partition with backup/restore option, but I was just trying other options.
    Thanks,
    Grofaty

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    Quote Originally Posted by Marcus_A
    I would get a copy of the Up and Running on DB2 9.5 for Linux redbook on the IBM website...
    Up and Running with DB2 on Linux:
    http://www.redbooks.ibm.com/abstracts/sg246899.html

Posting Permissions

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