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!

UTL File Maxmimum Line size error

Status
Not open for further replies.

Thameem

Programmer
Sep 18, 2002
30
US
Hi,
I need to write a text file with some values. The value I write inot a singel line is very large .
so that even after setting maximum buffer size in FOPEN , The file write produces error
and the the long line is not getting written. Is there anyway out to make the line to be written.

Regards,
Thameem
 
Thameem,

Could you please confirm the value you used for MAX_LINESIZE? The maximum allowed value is 32,767. What is the maximum linesize you need to output via utl_file at one time?

Could you please post the error message you are receiving, as well?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 02:57 (08Dec04) UTC (aka "GMT" and "Zulu"),
@ 19:57 (07Dec04) Mountain Time
 
Mufasa,
I gave the buffer size as 32767
and the following error I got

SP2-0027: Input is too long (> 2499 characters) - line ignored

PL/SQL procedure successfully completed.

One that line which has the longest value gets skipped and all other line got written well.

Regards,
Ansari

 
Thameem,

Your problem is not with UTL_FILE's output MAX_LINESIZE being exceeded; the problem is with your exceeding SQL*Plus's input maximum of 2499 characters.

You will need to break up the offending command in some way. It shouldn't be too much trouble since you can instruct PL/SQL to concatenate the string in pieces.

Let us know,

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 07:57 (08Dec04) UTC (aka "GMT" and "Zulu"),
@ 00:57 (08Dec04) Mountain Time
 
Mufasa,
Its working after I split up the lines. Thanks for your suggestions.

Regards,
Thameem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top