Solved

UTL help me please....ORU-10028: line length overflow, limit of 255 bytes per line

Posted on 2001-07-26
5
909 Views
Last Modified: 2011-10-03
I want to read a line from text file whose have about 500 characters and the error :
ORU-10028: line length overflow, limit of 255 bytes per line
appear...

how can i get read more than 255 bytes from Text file with UTL_File.Get line??

If its impossible how can i do this???

Thanks!!!
0
Comment
Question by:cdlima
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:fva
ID: 6322670
Maybe you'll have to live with that.
Try to split the file in some external way before.(something like the C-style "\" before the end of line for continuing the line)
Or you might want to look into external procs and do your stuff there.

F.
0
 
LVL 1

Accepted Solution

by:
chdba earned 50 total points
ID: 6322909
It's a problem of dbms_output and not a problem of UTL_FILE.

I tried it. As soon, as I try to print the variable on screen (DBMS_OUTPUT) it fails with ORU-10028. If you need dbms_output, you'll have to split before using dbms_output.

This example works fine (change path and file_name):
Of course you have to create a test_input with long lines.

PROCEDURE test_ch2 IS
  vcLinebuffer  VARCHAR2(1022);
  vxFilehandle  UTL_FILE.FILE_TYPE;
BEGIN
  vxFilehandle := UTL_FILE.FOPEN('[/path]','[file_name]','r');
  WHILE 1 < 2
  LOOP
    UTL_FILE.GET_LINE(vxFilehandle,vcLinebuffer);
--   dbms_output.put_line('Test:    '||vcLinebuffer);
    dbms_output.put_line('Length:  '||LENGTH(vcLinebuffer));
  END LOOP;
EXCEPTION
  WHEN no_data_found THEN
    -- Statements
    dbms_output.put_line('End');
    UTL_FILE.FCLOSE(vxFilehandle);
END;
--

My exaple-output:

DBBV8_SQL> exec test_ch2
Length:  12
Length:  43
Length:  114
Length:  309
Length:  4
Length:  8
Length:
Ende

PL/SQL procedure successfully completed.

Good luck
chdba
0
 

Author Comment

by:cdlima
ID: 6322933
Thank you!!!
Our friend said me "maybe you have to live with it"...
Its worst!!!!!

But now i retire the dbms_output and its run....


See you later!!!
0
 
LVL 4

Expert Comment

by:fva
ID: 6323072
I'm glad I was wrong.

F. :)
0
 

Author Comment

by:cdlima
ID: 6323106
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question