If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > When executing db2start: "The database manager shared memory set cannot be allocated"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-08, 10:47
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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
Reply With Quote
  #2 (permalink)  
Old 09-05-08, 13:10
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 09-08-08, 01:36
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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
Reply With Quote
  #4 (permalink)  
Old 09-10-08, 01:36
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On