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 > sql2310n when performing runstats on a large table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-09, 16:36
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
sql2310n when performing runstats on a large table

Hello,

We have DB2 9.1 on AIX 5L. We're getting sql2310n with error -930 when performing runstats on a large table. The ulimit settings:

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 32768
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) 2000


The interesting thing is that the same runstats command worked fine prior to reboot. Looking for some assistance. Thx
Reply With Quote
  #2 (permalink)  
Old 07-24-09, 17:09
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The runstats is getting this error:

Code:
SQL0930N  There is not enough storage available to process the
      statement.

Explanation:

A request was made to the database that required another memory page but
no more pages are available to the database manager.

The statement cannot be processed.

User response:

Possible solutions include:
*  Verify that your system has sufficient real and virtual memory.
*  Remove background processes.
*  If the error occurs during DUOW resynchronization, reduce the
   resync_interval database manager configuration parameter value.
*  If the error occurs on a statement which referenced a routine (UDF,
   stored procedure or method), it may be that the storage required to
   contain the arguments and return values was more than the memory
   available in the system. This might occur if the routine is defined
   with BLOB, CLOB, DBCLOB parameters or return values, having a large
   size (2GB for example).

If the possible solutions listed above do not solve the problem, it may
be necessary to consider changing the definition of the routine.

 sqlcode: -930

 sqlstate: 57011
You are out of memory...

Andy
Reply With Quote
  #3 (permalink)  
Old 07-24-09, 17:26
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
But vmstat shows I have plenty of memory.
Reply With Quote
  #4 (permalink)  
Old 07-24-09, 18:20
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2aix
But vmstat shows I have plenty of memory.
You may have plenty, but it's not necessarily available for DB2. You know, for example, the limits to the shared memory segments on AIX.
Reply With Quote
  #5 (permalink)  
Old 07-24-09, 19:31
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
This is a 64 bit instance, 32GB of RAM. What is preventing db2 from using the memory?
Reply With Quote
  #6 (permalink)  
Old 07-24-09, 21:41
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Check ulimit (data) of root. unlimited may not be in effect if the instance is started from root and ulimit of root is not unlimited. Try restarting the instance using the instance owner id.
Reply With Quote
  #7 (permalink)  
Old 07-27-09, 09:36
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
Can you explain why we need to check root's limit and also how to find out ulimit settings db2 is running with?
Reply With Quote
  #8 (permalink)  
Old 07-27-09, 18:00
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
The following technote should answer your question
Reply With Quote
  #9 (permalink)  
Old 07-27-09, 18:07
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Sorry, don't know what happened to my window...

Technote:
IBM - Why are the instance owner ulimits ignored when the instance is started with the DB2 fault monitor?


The ulimits are inherited from the user ID that starts the instance. If the instance is started from the non-instance owner ID (ie. some admin or root), then the ulimits for that ID are in effect. Root's ulimit is applied when the instance is autostarted on reboot. The pstat command mentioned in the technote can be used to check the ulimits in effect (look at the "max data" value).

The technote mentions EFBIG (in case of "file" not being set to unlimited), You'll see ENOMEM if db2 is unable to allocate private memory (for "data" parameter). If pstat confirms that ulimit (data) is not unlimited, change root's ulimit to match the instance owner ID.
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