Skip to Content
0
Jun 08, 2020 at 11:46 PM

Delete statement is giving Memory allocation Failed

341 Views

Hi All ,

For me it is giving error when i am trying to delete records from my table using temporary table data (30K),generated in procedure .

any clue what i am doing wrong .i am putting my code ..suggestions are welcomed .

DELETE FROM table_A tt

WHERE 1 = 1

AND (team_type = l_in_team_type or l_in_team_type = 'ALL')

--AND date_key between :l_in_start_date_key and :l_in_end_date_key

AND ( ( :l_full_load = 'yes' and tt.date_key between :l_in_start_date_key AND :l_in_end_date_key ) OR ( :l_full_load = 'no'

and exists ( SELECT 1 FROM :TEMP_CHANGED chg WHERE chg.client = tt.client AND chg.sales_document = tt.sales_document AND chg.sales_document_item = tt.sales_document_item AND chg.date_key = tt.date_key ) ) )

error message :

Statement 'call <procedure> successfully executed in 26.867 seconds (server processing time: 26.425 seconds) - Rows Affected: 24704 Could not execute 'call <procedure>' in 1:08.839 minutes . SAP DBTech JDBC: [4]: cannot allocate enough memory: search table error: <procedure>: line 174 col 15 (at pos 9428): [4] (range 3): cannot allocate enough memory: OOM. please check traces for further information (please check lines: 174, 233, 546, 715) Duration of 2 statements: 1:35.707 minutes

line : 174 ,233,546,715 all are place where i am having temporary variable assgined for data set .

Thanks in advance for suggestion .