BLOB - not release memory on a server

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Mic777
Posts: 4
Joined: Mon 11 Aug 2008 09:27

BLOB - not release memory on a server

Post by Mic777 » Thu 28 Apr 2011 08:45

If to use Blob as output parameter that memory it is not release on a server.

Example code:

StrPrc: TOraStoredProc;

Code: Select all

StrPrc.SQL.Text := 'begin :OutBLOB := :InBLOB; end;';
StrPrc.Options.TemporaryLobUpdate := True;
StrPrc.Options.CacheLobs := False;
StrPrc.Options.DeferredLobRead := True;
StrPrc.Prepare;
StrPrc.Params.ParamByName('InBLOB').DataType := ftOraBlob;
StrPrc.Params.ParamByName('InBLOB').ParamType := ptInput;
StrPrc.Params.ParamByName('OutBLOB').DataType := ftOraBlob;
StrPrc.Params.ParamByName('OutBLOB').ParamType := ptOutput;
StrPrc.Params.ParamByName('InBLOB').AsOraBlob.LoadFromFile('C:\111.sql');
StrPrc.Execute;
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.ReadLob;
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.SaveToFile('C:\333.sql');
Query "select * from v$temporary_lobs" return value field "CACHE_LOBS/NOCACHE_LOBS" > 0 and increase by each call StrPrc.Execute;

Call
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.FreeBlob
or
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.FreeTemporary
does not release used LOB.

Help!!!
:?: How to release used LOB???

Mic777
Posts: 4
Joined: Mon 11 Aug 2008 09:27

Really nobody excites it?

Post by Mic777 » Thu 28 Apr 2011 10:45

Answer please

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 28 Apr 2011 11:38

Hello,

Thank you for the information.
We have reproduced the problem.
We will notify you as soon as we have any results.

dimon_adv
Posts: 27
Joined: Mon 01 Feb 2010 09:36

Post by dimon_adv » Fri 13 May 2011 06:53

AlexP wrote:We will notify you as soon as we have any results.
No any results ?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 13 May 2011 08:41

Hello,

We are still working on this problem.
We will notify you as soon as we have any results.

dimon_adv
Posts: 27
Joined: Mon 01 Feb 2010 09:36

Post by dimon_adv » Mon 13 Jun 2011 09:06

28 Apr - 13 Jun - No result ?
I paid for support, but where is she? Why critical errors related to not release the resource can not be solved?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 14 Jun 2011 07:43

Hello,

We've fixed this problem, but this fix will not work on Oracle 10, because temporary LOB cannot be cleared after assigning data to it in this version (it seems that it is an Oracle bug).

You can use the following PL/SQL code to clear the used LOBs in Oracle 10:

Code: Select all

begin 
dbms_lob.createtemporary(:OutBLOB, false, DBMS_LOB.SESSION); dbms_lob.copy(:OutBLOB, :InBLOB, dbms_lob.getlength(:InBLOB), 1, 1); 
end;
and you can free OutBLOB on the client side using the FreeTemporary method.

dimon_adv
Posts: 27
Joined: Mon 01 Feb 2010 09:36

Post by dimon_adv » Tue 14 Jun 2011 07:48

Next release work fine with Oracle 11gR2 ?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 14 Jun 2011 08:10

Hello,

Yes, in the next ODAC build during working with BLOBs on Oracle 11R2, they will be deleted correctly.
We are going to release the new build tomorrow or the day after tomorrow.

dimon_adv
Posts: 27
Joined: Mon 01 Feb 2010 09:36

Post by dimon_adv » Tue 14 Jun 2011 08:13

Thanks.

Post Reply