Insert many CLob at Directmode - Server Memoryleak

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ErnstR
Posts: 2
Joined: Thu 22 Apr 2010 05:44

Insert many CLob at Directmode - Server Memoryleak

Post by ErnstR » Wed 28 Apr 2010 16:50

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 ?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Thu 29 Apr 2010 14:21

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.

ErnstR
Posts: 2
Joined: Thu 22 Apr 2010 05:44

Post by ErnstR » Thu 29 Apr 2010 14:59

Hello,
setting TemporaryLobUpdate = False have the same result [Ora04030] :(

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

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Thu 06 May 2010 13:42

Hello

I sent answer by E-mail.

Post Reply