Page 1 of 1

BLOB - not release memory on a server

Posted: Thu 28 Apr 2011 08:45
by Mic777
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???

Really nobody excites it?

Posted: Thu 28 Apr 2011 10:45
by Mic777
Answer please

Posted: Thu 28 Apr 2011 11:38
by AlexP
Hello,

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

Posted: Fri 13 May 2011 06:53
by dimon_adv
AlexP wrote:We will notify you as soon as we have any results.
No any results ?

Posted: Fri 13 May 2011 08:41
by AlexP
Hello,

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

Posted: Mon 13 Jun 2011 09:06
by dimon_adv
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?

Posted: Tue 14 Jun 2011 07:43
by AlexP
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.

Posted: Tue 14 Jun 2011 07:48
by dimon_adv
Next release work fine with Oracle 11gR2 ?

Posted: Tue 14 Jun 2011 08:10
by AlexP
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.

Posted: Tue 14 Jun 2011 08:13
by dimon_adv
Thanks.