Solved

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

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

Join & Write a Comment

Suggested Solutions

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ā€¦
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.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now