Print Thread
Problem with fetching huge clob as single piece
#35401 09/11/09 12:05 PM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
Hi, i have issue when i try to get huge clob content as
sting, i receive error:
"ora-24817 Unable allocate gived chunk for current lob operation".

problem in TLobLocator.getString method
at line
rs := Read(Result[1], ASize * cs);

ASize * cs > 8mb

Is it possible to fix this in DOA?

Last edited by PascalVB; 09/11/09 03:11 PM.
Re: Problem with fetching huge clob as single piece
PascalVB #35498 09/17/09 10:10 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
We'll check it out. I'm not sure where this ORA-24817 limitation is coming from.


Marco Kalter
Allround Automations
Re: Problem with fetching huge clob as single piece
Marco Kalter #35903 10/06/09 08:12 AM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
Here is basic fix: is it posible to apply it in nearest bugfix release?
function TLOBLocator.GetString(ASize: Integer): string;
var cs, rs: integer;
bytesToRead: integer;
CurrentPosition: integer;
BlockSize: integer;
begin
if LOBType = otCLOB then cs := Session.CharacterSize else cs := 1;
SetLength(Result, Asize * cs);
Seek(soFromBeginning, 0);
CurrentPosition := 1;
BlockSize := 1048576*8;
BytesToRead := Asize * cs;
while (BytesToRead > 0) do begin
IF BytesToRead < BlockSize THEN BlockSize := BytesToRead;
rs := Read(Result[CurrentPosition], BlockSize);
IF rs = 0 then break;
Inc(CurrentPosition, Rs);
Dec(BytesToRead, rs);
end;
Setlength(result, currentposition-1);
if LOBType = otCLOB then Result := AddCR(Result, Session);
end;

Re: Problem with fetching huge clob as single piece
PascalVB #35908 10/06/09 10:31 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Thanks. We'll check it out.


Marco Kalter
Allround Automations
Re: Problem with fetching huge clob as single piece
Marco Kalter #37066 01/21/10 01:04 PM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
Hello, Marko.
When i can expect response and solve of problem?

Re: Problem with fetching huge clob as single piece
PascalVB #37074 01/22/10 10:32 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
We have not yet been able to reproduce this.


Marco Kalter
Allround Automations
Re: Problem with fetching huge clob as single piece
Marco Kalter #37089 01/25/10 03:44 PM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
On which version of doa you are perform tests? which size of test clob?


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.046s Queries: 14 (0.010s) Memory: 2.5249 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-17 15:07:33 UTC
Valid HTML 5 and Valid CSS