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 > error executing a query.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 415
error executing a query.

Good afternoon,

I have DB2 V8 on AIX 5.3.

In the database was running a process and it has given this error:
SQL0955C Sort memory cannot be allocated to process the statement. Reason
code = "2".

Any help will be greatly appreciated.

Thank you very much.
__________________
DBA DB2 for LUW
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Posts: 4,119
From the manual:

Code:
SQL0955C  Sort memory cannot be allocated to process the statement.
      Reason code = "<reason-code>".

Explanation:

Insufficient virtual memory is available to the database agent for sort
processing, as indicated by the reason code:

1        Insufficient private process memory.

2        Insufficient shared memory in the database-wide shared memory
         area designated for sort processing.

The statement cannot be processed but other SQL statements may be
processed.

User response:

One or more of the following:
*  Decrease the value of the sort heap parameter ( sortheap) in the
   corresponding database configuration file.
*  For reason code 1, increase the private virtual memory available, if
   possible. For example, on UNIX systems you can use the ulimit command
   to increase the maximum size of the data area for a process.
*  For reason code 2, increase the size of the database-wide shared
   memory area designated for sort processing by increasing the value of
   the SHEAPTHRES_SHR database configuration parameter.

 sqlcode: -955

 sqlstate: 57011
Andy
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 415
thanks for your prompt response,

I have read that in the documentation, the parameter has this value:
Sort heap thres for shared sorts (4KB) (sheapthres_shr) = 40000

There is a formula to calculate the value of this parameter must have?

Greetings.
__________________
DBA DB2 for LUW
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Posts: 4,119
What does the manual say?

Andy
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 415
My question is how many pages increase the parameter sheapthres_shr?

Thank you.
__________________
DBA DB2 for LUW
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Posts: 4,119
I cannot give you an answer, because it depends on numerous things--none of which you have supplied. You need to read the manual and apply it to your situation.

Andy
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