Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-29285 with utl_file.fopen 1

Status
Not open for further replies.

jestrada101

Technical User
Mar 28, 2003
332
When writing to the file works fine with

Open my file like this...
utl_file.fopen ('TESTA',filename, 'A')

I write to file like this...
utl_file.put_line (output_file,MyVarData);

ERROR at line 1:
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 18

It only seems to be a problem when the string of MyVarData is very long.. over 2000 characters.

Any ideas?
 
J,

For what it is worth, my tests show that I can successfully output 1,022 characters with "utl_file_put_line", but if I attempt 1,023 characters, it blows with the same error you received. I also tried to "stage" data in pieces, then "flush" the data, but I still ran into the same 1,022-characters-total limitation.

It would be an interesting experiment to see if your limitation is precisely the same 1,022 characters as mine. If not, then there may be some method to alter the output maximum.

Let me know.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 17:27 (02Dec04) UTC (aka "GMT" and "Zulu"),
@ 10:27 (02Dec04) Mountain Time
 
I tested at 1022 and 1023 characters and you are right, this is the failing point. Hmm... guess I'll keeptrying to research how to extend this somehow.
 
J,

Eureka !!! I found and tested a solution for you. Add one more parameter onto your "utl_file.fopen" function:
Code:
:=	utl_file.fopen(
					location => path,
					filename => filename,
					open_mode => read_write_append,
					[b]max_linesize => 32767[/b]);

This allows you to go up to 32K of output per line and there is no penalty. Recommendation is, use "max_linesize => 32767" for each utl_file.fopen.

Let us know how it works for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 18:40 (03Dec04) UTC (aka "GMT" and "Zulu"),
@ 11:40 (03Dec04) Mountain Time
 
Perfect!!! Thanks... I actually seen where it would take that last argument, but did not know to put the "=>".

Many thanks!
Jose E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top