Page 1 of 1

Insert many CLob at Directmode - Server Memoryleak

Posted: Wed 28 Apr 2010 16:50
by ErnstR
Hello,
i try to insert al lot of CLob Data Records to a Oracle 10.0.2.4 Server at direct mode. After about 500.000 inserts i get a Ora-04030 "no Processmemory" Error. I´m using ODAC 6.90.0.57 at direct mode and Delphi 2007

I think there is a problem of free object´s at server side.

Sample:

~~~
OraSQL1.Session.AutoCommit:= True;
OraSQL1.AutoCommit:= True;
OraSQL1.TemporaryLobUpdate:= True;

OraLob:= TOraLob.Create( OraSession1.OCISvcCtx ) ;
OraLob.CreateTemporary( ltClob );

OraSQL1.SQL.Clear;
OraSQL1.SQL.Add('INSERT INTO TEST_CLOB' );
OraSQL1.SQL.Add('(ID, CLOB_VALUE)' );
OraSQL1.SQL.Add('VALUES (:ID, :CLOB_VALUE)' );

Gauge1.MaxValue:= 1000000;

for I:= 1 to 1000000 do begin

OraSQL1.ParamByName('ID').AsInteger:= I;

OraLob.Clear;
OraLob.AsString:= '-' + StringOfChar('A', Random(256) ) + '-';
OraLob.WriteLob;

OraSQL1.ParamByName('CLOB_VALUE').ParamType := ptInput;
OraSQL1.ParamByName('CLOB_VALUE').AsOraClob:= OraLob;
OraSQL1.Execute;
end;

OraLob.FreeTemporary;
OraLob.Free;
OraSQL1.Session.Commit;
~~~

Is there anything to do ?

Posted: Thu 29 Apr 2010 14:21
by bork
Hello

If you set the property TemporaryLobUpdate to True then ODAC will be call CreateTemporary on each insert record that contains Clob fields. Try to set the property TemporaryLobUpdate to False and repeat you insert operation.

Posted: Thu 29 Apr 2010 14:59
by ErnstR
Hello,
setting TemporaryLobUpdate = False have the same result [Ora04030] :(

I have a smal sample to reprocess the error. I send it via mail

Posted: Thu 06 May 2010 13:42
by bork
Hello

I sent answer by E-mail.