BLOB - not release memory on a server
Posted: 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;
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???
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');Call
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.FreeBlob
or
StrPrc.Params.ParamByName('OutBLOB').AsOraBlob.FreeTemporary
does not release used LOB.
Help!!!