Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-04031: error ..how to solve this ??

ORA-04031: error ..how to solve this ??

From: Parvinder Singh <parora_at_questone.com>
Date: Thu, 20 Jan 2000 16:33:40 GMT
Message-ID: <3887388C.E9FD3174@questone.com>


Hi all

I have got this following query which when executed in SQL Plus gives the following error.

SQL> select pd_id,mkt_id
  2 from ms1_tab

  3  where pd_id in(0,1,2,3,4,5,6,7,8,9,10,11,
  4  12,13,14,15,16,17,18,19,20,21,22,23,
  5  24,25,26,27,28,29,30,31,32,33,34,35,
  6  36,37,38,39,40,41,42,43,44,45,46,47,
  7  48,49,50,51,52,53,54,55,56,57,58,60,
  8  61,62,63,64,65,66,67,68,69,70,71,72,
  9  73,74,75,76,77,78,79,80,81,82,83,84,
 10  85,86,87,88,89,90,91,92,93,94,95,96,
 11  97,98,99,100,101,102,103,104,105,106,107,108,
 12  109,110,111,112,113,114,115,116,117,118,119,120,
 13  121,122,123,124,125,126,127,128,129,130,131,132,
 14  133,134,135,136,137,138,139,140,141,142,143,144,
 15  145,146,147,148,149,150,151,152,153,154,155,156,
 16  157,158,159,160,161,162,163,164,165,166,167,168,
 17  169,170,171,172,173,174,175,176,177,178,179,180,
 18  181,182,183,184,185,186,187,188,189,190,191,192,
 19  193,194,195,196,197,198,199,2,201,202,203,204,
 20 205,206,207,208,209,210,211,212,213,214,215,216,  21 217,218,219,220,221,222,223,224,225)  22 and mkt_id in
 23  (0,1,2,3,4,5,6,7,8,9,10,11,
 24  12,13,14,15,16,17,18,19,20,21,22,23,
 25  24,25,26,28,29,31,32,33,34,35,36,37,
 26  38,39,40,41,42,43,44,45,46,47,48,49,
 27  50,51,52,53,54,55,56,57,58,59,60,61,
 28  62,63,64,65,66)

 29 ;
from ms1_tab

     *
ERROR at line 2:
ORA-01037: maximum cursor memory exceeded

   Infact the query size was larger than this ...when we executed a larger query than this (around 9000 bytes) it gave us this error

ORA-04031: unable to allocate 24 bytes of shared memory ("shared pool","select pd_id,mkt_id
from ms1...","sql area","logdef : apaclg")

We also increased the shared pool area to by setting the SHARED_POOL_SIZE to 200mb
but still we are getting the same error

Kindly help

Thanks & Regards
~Parvinder

P.S : I am attaching the text file of the query


select pd_id, mkt_id,mth_id
from ms1_tab
where
(ms1_tab.pd_id = 0 OR ms1_tab.pd_id=1 OR ms1_tab.pd_id=00002 OR ms1_tab.pd_id=00003 OR

ms1_tab.pd_id=00004 OR ms1_tab.pd_id=00005 OR ms1_tab.pd_id=00006 OR ms1_tab.pd_id=00007 OR
ms1_tab.pd_id=00008 OR ms1_tab.pd_id=00009 OR ms1_tab.pd_id=00010 OR ms1_tab.pd_id=00011 OR
ms1_tab.pd_id=00012 OR ms1_tab.pd_id=00013 OR ms1_tab.pd_id=00014 OR ms1_tab.pd_id=00015 OR
ms1_tab.pd_id=00016 OR ms1_tab.pd_id=00017 OR ms1_tab.pd_id=00018 OR ms1_tab.pd_id=00019 OR
ms1_tab.pd_id=00020 OR ms1_tab.pd_id=00021 OR ms1_tab.pd_id=00022 OR ms1_tab.pd_id=00023 OR
ms1_tab.pd_id=00024 OR ms1_tab.pd_id=00025 OR ms1_tab.pd_id=00026 OR ms1_tab.pd_id=00027 OR
ms1_tab.pd_id=00028 OR ms1_tab.pd_id=00029 OR ms1_tab.pd_id=00030 OR ms1_tab.pd_id=00031 OR
ms1_tab.pd_id=00032 OR ms1_tab.pd_id=00033 OR ms1_tab.pd_id=00034 OR ms1_tab.pd_id=00035 OR
ms1_tab.pd_id=00036 OR ms1_tab.pd_id=00037 OR ms1_tab.pd_id=00038 OR ms1_tab.pd_id=00039 OR
ms1_tab.pd_id=00040 OR ms1_tab.pd_id=00041 OR ms1_tab.pd_id=00042 OR ms1_tab.pd_id=00043 OR
ms1_tab.pd_id=00044 OR ms1_tab.pd_id=00045 OR ms1_tab.pd_id=00046 OR ms1_tab.pd_id=00047 OR
ms1_tab.pd_id=00048 OR ms1_tab.pd_id=00049 OR ms1_tab.pd_id=00050 OR ms1_tab.pd_id=00051 OR
ms1_tab.pd_id=00052 OR ms1_tab.pd_id=00053 OR ms1_tab.pd_id=00054 OR ms1_tab.pd_id=00055 OR
ms1_tab.pd_id=00056 OR ms1_tab.pd_id=00057 OR ms1_tab.pd_id=00058 OR ms1_tab.pd_id=00060 OR
ms1_tab.pd_id=00061 OR ms1_tab.pd_id=00062 OR ms1_tab.pd_id=00063 OR ms1_tab.pd_id=00064 OR
ms1_tab.pd_id=00065 OR ms1_tab.pd_id=00066 OR ms1_tab.pd_id=00067 OR ms1_tab.pd_id=00068 OR
ms1_tab.pd_id=00069 OR ms1_tab.pd_id=00070 OR ms1_tab.pd_id=00071 OR ms1_tab.pd_id=00072 OR
ms1_tab.pd_id=00073 OR ms1_tab.pd_id=00074 OR ms1_tab.pd_id=00075 OR ms1_tab.pd_id=00076 OR
ms1_tab.pd_id=00077 OR ms1_tab.pd_id=00078 OR ms1_tab.pd_id=00079 OR ms1_tab.pd_id=00080 OR
ms1_tab.pd_id=00081 OR ms1_tab.pd_id=00082 OR ms1_tab.pd_id=00083 OR ms1_tab.pd_id=00084 OR
ms1_tab.pd_id=00085 OR ms1_tab.pd_id=00086 OR ms1_tab.pd_id=00087 OR ms1_tab.pd_id=00088 OR
ms1_tab.pd_id=00089 OR ms1_tab.pd_id=00090 OR ms1_tab.pd_id=00091 OR ms1_tab.pd_id=00092 OR
ms1_tab.pd_id=00093 OR ms1_tab.pd_id=00094 OR ms1_tab.pd_id=00095 OR ms1_tab.pd_id=00096 OR
ms1_tab.pd_id=00097 OR ms1_tab.pd_id=00098 OR ms1_tab.pd_id=00099 OR ms1_tab.pd_id=00100 OR
ms1_tab.pd_id=00101 OR ms1_tab.pd_id=00102 OR ms1_tab.pd_id=00103 OR ms1_tab.pd_id=00104 OR
ms1_tab.pd_id=00105 OR ms1_tab.pd_id=00106 OR ms1_tab.pd_id=00107 OR ms1_tab.pd_id=00108 OR
ms1_tab.pd_id=00109 OR ms1_tab.pd_id=00110 OR ms1_tab.pd_id=00111 OR ms1_tab.pd_id=00112 OR
ms1_tab.pd_id=00113 OR ms1_tab.pd_id=00114 OR ms1_tab.pd_id=00115 OR ms1_tab.pd_id=00116 OR
ms1_tab.pd_id=00117 OR ms1_tab.pd_id=00118 OR ms1_tab.pd_id=00119 OR ms1_tab.pd_id=00120 OR
ms1_tab.pd_id=00121 OR ms1_tab.pd_id=00122 OR ms1_tab.pd_id=00123 OR ms1_tab.pd_id=00124 OR
ms1_tab.pd_id=00125 OR ms1_tab.pd_id=00126 OR ms1_tab.pd_id=00127 OR ms1_tab.pd_id=00128 OR
ms1_tab.pd_id=00129 OR ms1_tab.pd_id=00130 OR ms1_tab.pd_id=00131 OR ms1_tab.pd_id=00132 OR
ms1_tab.pd_id=00133 OR ms1_tab.pd_id=00134 OR ms1_tab.pd_id=00135 OR ms1_tab.pd_id=00136 OR
ms1_tab.pd_id=00137 OR ms1_tab.pd_id=00138 OR ms1_tab.pd_id=00139 OR ms1_tab.pd_id=00140 OR
ms1_tab.pd_id=00141 OR ms1_tab.pd_id=00142 OR ms1_tab.pd_id=00143 OR ms1_tab.pd_id=00144 OR
ms1_tab.pd_id=00145 OR ms1_tab.pd_id=00146 OR ms1_tab.pd_id=00147 OR ms1_tab.pd_id=00148 OR
ms1_tab.pd_id=00149 OR ms1_tab.pd_id=00150 OR ms1_tab.pd_id=00151 OR ms1_tab.pd_id=00152 OR
ms1_tab.pd_id=00153 OR ms1_tab.pd_id=00154 OR ms1_tab.pd_id=00155 OR ms1_tab.pd_id=00156 OR
ms1_tab.pd_id=00157 OR ms1_tab.pd_id=00158 OR ms1_tab.pd_id=00159 OR ms1_tab.pd_id=00160 OR
ms1_tab.pd_id=00161 OR ms1_tab.pd_id=00162 OR ms1_tab.pd_id=00163 OR ms1_tab.pd_id=00164 OR
ms1_tab.pd_id=00165 OR ms1_tab.pd_id=00166 OR ms1_tab.pd_id=00167 OR ms1_tab.pd_id=00168 OR
ms1_tab.pd_id=00169 OR ms1_tab.pd_id=00170 OR ms1_tab.pd_id=00171 OR ms1_tab.pd_id=00172 OR
ms1_tab.pd_id=00173 OR ms1_tab.pd_id=00174 OR ms1_tab.pd_id=00175 OR ms1_tab.pd_id=00176 OR
ms1_tab.pd_id=00177 OR ms1_tab.pd_id=00178 OR ms1_tab.pd_id=00179 OR ms1_tab.pd_id=00180 OR
ms1_tab.pd_id=00181 OR ms1_tab.pd_id=00182 OR ms1_tab.pd_id=00183 OR ms1_tab.pd_id=00184 OR
ms1_tab.pd_id=00185 OR ms1_tab.pd_id=00186 OR ms1_tab.pd_id=00187 OR ms1_tab.pd_id=00188 OR
ms1_tab.pd_id=00189 OR ms1_tab.pd_id=00190 OR ms1_tab.pd_id=00191 OR ms1_tab.pd_id=00192 OR
ms1_tab.pd_id=00193 OR ms1_tab.pd_id=00194 OR ms1_tab.pd_id=00195 OR ms1_tab.pd_id=00196 OR
ms1_tab.pd_id=00197 OR ms1_tab.pd_id=00198 OR ms1_tab.pd_id=00199 OR ms1_tab.pd_id=00200 OR
ms1_tab.pd_id=00201 OR ms1_tab.pd_id=00202 OR ms1_tab.pd_id=00203 OR ms1_tab.pd_id=00204 OR
ms1_tab.pd_id=00205 OR ms1_tab.pd_id=00206 OR ms1_tab.pd_id=00207 OR ms1_tab.pd_id=00208 OR
ms1_tab.pd_id=00209 OR ms1_tab.pd_id=00210 OR ms1_tab.pd_id=00211 OR ms1_tab.pd_id=00212 OR
ms1_tab.pd_id=00213 OR ms1_tab.pd_id=00214 OR ms1_tab.pd_id=00215 OR ms1_tab.pd_id=00216 OR
ms1_tab.pd_id=00217 OR ms1_tab.pd_id=00218 OR ms1_tab.pd_id=00219 OR ms1_tab.pd_id=00220 OR 
ms1_tab.pd_id=00221 OR ms1_tab.pd_id=00222 OR ms1_tab.pd_id=00223 OR ms1_tab.pd_id=00224 OR
ms1_tab.pd_id=00225)

and (ms1_tab.mkt_id=00000 or ms1_tab.mkt_id =00001 or ms1_tab.mkt_id =00002 or
ms1_tab.mkt_id =00003 or ms1_tab.mkt_id =00004 or ms1_tab.mkt_id =00005 or 
ms1_tab.mkt_id =00006 or ms1_tab.mkt_id =00007 or ms1_tab.mkt_id =00008 or
ms1_tab.mkt_id =00009 or ms1_tab.mkt_id =00010 or ms1_tab.mkt_id =00011 or
ms1_tab.mkt_id =00012 or ms1_tab.mkt_id =00013 or ms1_tab.mkt_id =00014 or
ms1_tab.mkt_id =00015 or ms1_tab.mkt_id =00016 or ms1_tab.mkt_id =00017 or 
ms1_tab.mkt_id =00018 or ms1_tab.mkt_id =00019 or  ms1_tab.mkt_id =00020 or
ms1_tab.mkt_id =00021 or  ms1_tab.mkt_id =00022 or ms1_tab.mkt_id =00023 or 
ms1_tab.mkt_id =00024 or ms1_tab.mkt_id =00025 or ms1_tab.mkt_id =00026 or
ms1_tab.mkt_id =00028 or ms1_tab.mkt_id =00029 or  ms1_tab.mkt_id= 00031 or
ms1_tab.mkt_id =00032 or ms1_tab.mkt_id =00033 or ms1_tab.mkt_id =00034 or
ms1_tab.mkt_id =00035 or ms1_tab.mkt_id =00036 or  ms1_tab.mkt_id =00037 or
ms1_tab.mkt_id =00038 or ms1_tab.mkt_id =00039 or ms1_tab.mkt_id =00040 or
ms1_tab.mkt_id =00041 or ms1_tab.mkt_id =00042 or ms1_tab.mkt_id =00043 or
ms1_tab.mkt_id =00044 or ms1_tab.mkt_id =00045 or ms1_tab.mkt_id =00046 or
ms1_tab.mkt_id =00047 or ms1_tab.mkt_id =00048 or ms1_tab.mkt_id =00049 or
ms1_tab.mkt_id =00050 or  ms1_tab.mkt_id =00051 or  ms1_tab.mkt_id =00052 or
ms1_tab.mkt_id =00053 or ms1_tab.mkt_id =00054 or ms1_tab.mkt_id =00055 or
ms1_tab.mkt_id =00056 or ms1_tab.mkt_id =00057 or ms1_tab.mkt_id =00058 or
ms1_tab.mkt_id =00059 or ms1_tab.mkt_id =00060 or ms1_tab.mkt_id =00061 or
ms1_tab.mkt_id =00062 or ms1_tab.mkt_id =00063 or  ms1_tab.mkt_id =00064 or
ms1_tab.mkt_id =00065 or ms1_tab.mkt_id =00066) 
and (ms1_tab.mth_id = to_date('JAN1990','MONYYYY') or mth_id =to_date('FEB1990','MONYYYY') or
mth_id =to_date('MAR1990','MONYYYY') or mth_id =to_date('APR1990','MONYYYY') or
mth_id =to_date('MAY1990','MONYYYY') or mth_id =to_date('JUN1990','MONYYYY') or
mth_id =to_date('JUL1990','MONYYYY') or mth_id =to_date('AUG1990','MONYYYY') or
mth_id =to_date('SEP1990','MONYYYY') or mth_id =to_date('OCT1990','MONYYYY') or
mth_id =to_date('NOV1990','MONYYYY') or mth_id =to_date('DEC1990','MONYYYY') or
mth_id =to_date('JAN1991','MONYYYY') or mth_id =to_date('FEB1991','MONYYYY') or
mth_id =to_date('MAR1991','MONYYYY') or mth_id =to_date('APR1991','MONYYYY') or
mth_id =to_date('MAY1991','MONYYYY') or mth_id =to_date('JUN1991','MONYYYY') or
mth_id =to_date('JUL1991','MONYYYY') or mth_id =to_date('AUG1991','MONYYYY') or
mth_id =to_date('SEP1991','MONYYYY') or mth_id =to_date('OCT1991','MONYYYY') or
mth_id =to_date('NOV1991','MONYYYY') or mth_id =to_date('DEC1991','MONYYYY') or
mth_id =to_date('JAN1992','MONYYYY') or mth_id =to_date('FEB1992','MONYYYY') or
mth_id =to_date('MAR1992','MONYYYY') or mth_id =to_date('APR1992','MONYYYY') or
mth_id =to_date('MAY1992','MONYYYY') or mth_id =to_date('JUN1992','MONYYYY') or
mth_id =to_date('JUL1992','MONYYYY') or mth_id =to_date('AUG1992','MONYYYY') or
mth_id =to_date('SEP1992','MONYYYY') or mth_id =to_date('OCT1992','MONYYYY') or
mth_id =to_date('NOV1992','MONYYYY') or mth_id =to_date('DEC1992','MONYYYY') or
mth_id =to_date('JAN1993','MONYYYY') or mth_id =to_date('FEB1993','MONYYYY') or
mth_id =to_date('MAR1993','MONYYYY') or mth_id =to_date('APR1993','MONYYYY') or
mth_id =to_date('MAY1993','MONYYYY') or mth_id =to_date('JUN1993','MONYYYY') or
mth_id =to_date('JUL1993','MONYYYY') or mth_id =to_date('AUG1993','MONYYYY') or
mth_id =to_date('SEP1993','MONYYYY') or mth_id =to_date('NOV1993','MONYYYY') or
mth_id =to_date('DEC1993','MONYYYY') or mth_id =to_date('JAN1994','MONYYYY') or
mth_id =to_date('FEB1994','MONYYYY') or mth_id =to_date('MAR1994','MONYYYY') or
mth_id =to_date('APR1994','MONYYYY') or mth_id =to_date('MAY1994','MONYYYY') or
mth_id =to_date('JUN1994','MONYYYY') or mth_id =to_date('JUL1994','MONYYYY') or
mth_id =to_date('AUG1994','MONYYYY') or mth_id =to_date('SEP1994','MONYYYY') or
mth_id =to_date('OCT1994','MONYYYY') or mth_id =to_date('NOV1994','MONYYYY') or
mth_id =to_date('DEC1994','MONYYYY') or mth_id =to_date('JAN1995','MONYYYY') or
mth_id =to_date('FEB1995','MONYYYY') or mth_id =to_date('MAR1995','MONYYYY') or
mth_id =to_date('APR1995','MONYYYY') or mth_id =to_date('MAY1995','MONYYYY') or
mth_id =to_date('JUN1995','MONYYYY'))

Received on Thu Jan 20 2000 - 10:33:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US