Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Unable to write more than 1K with UTL_FILE
Just so that you don't get further disappointed ... not only are UTL_FILE records
limited to 1022 characters, but the file size is limited to about 1,000,000 bytes
too!!
What with the stupid limits on DBMS_OUTPUT and these limits on UTL_FILE, it's
sometimes hard to figure out what the Oracle developers are think of! Maybe
Oracle gets all it's developers from Microsoft...
raffaele.d'alba_at_snamprogetti.eni.it wrote:
> please try this with a DB oracle 7.3.xx:
>
> declare
> OUT_FILE UTL_FILE.FILE_TYPE;
> buffer varchar2(10) := 'a';
> counter integer := 0;
> begin
> OUT_FILE:=UTL_FILE.FOPEN('c:\temp\', 'test.txt', 'w');
> if utl_file.is_open(OUT_FILE) then
> while true loop
> UTL_FILE.PUT(OUT_FILE, buffer);
> UTL_FILE.FFLUSH(OUT_FILE);
> Counter := Counter+1;
> end loop;
> end if;
> utl_file.fclose(OUT_file);
> exception
> when others then dbms_output.put_line('record #:' || Counter);
> end;
> /
>
> as you can see the procedure exits at character 1023.
>
> I've to manage records with much more data, can anybody suggest me a soluton?
>
> thank you in advance,
> Raffaele
Received on Fri Nov 05 1999 - 16:26:48 CST