Solved

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

Posted on 2001-07-26
5
910 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

685 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