Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: utl_file on Redhat Linux Oracle 9 standard engine

RE: utl_file on Redhat Linux Oracle 9 standard engine

From: Cary Millsap <cary.millsap_at_hotsos.com>
Date: Wed, 09 Jul 2003 05:51:04 -0700
Message-ID: <F001.005C4109.20030709054425@fatcity.com>


John,

UTL_FILE is one of the worst designed functions I've ever tried to use.

In my opinion, it's a major design flaw to use the newline character ('\n') as a packet delimiter. If UTL_FILE gets input lines that are "too long" (too many bytes between '\n' characters), you'll get an error. If you have short lines in your input (like "Heading\nSubHeading\nLine1\nLine2\n..."), then you'll have lots of nearly empty packets flying across your network, which creates a horrible performance problem for the program using UTL_FILE, and for others who have to compete against the traffic.

Check out the trcfiled.pl part of Sparky (www.hotsos.com/products/sparky). It's open source Perl that does file transfers (and a few other things) on the order of 100x faster than UTL_FILE. It's a free download.

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com

Upcoming events:

- Hotsos Clinic 101 in Dallas, Washington, Denver, Sydney
- Hotsos Symposium 2004, March 7-10 Dallas
- Visit www.hotsos.com for schedule details...


-----Original Message-----
Dunn
Sent: Wednesday, July 09, 2003 8:24 AM
To: Multiple recipients of list ORACLE-L

I have a problem with utl_file in Oracle 9 on Linux, standard engine....

It does not seem to want to read lines longer than 997 characters. It works fine if the line is 997 characters or less.

I get a utl_file.write_error exception if the line is longer than 997 charcaters!!!!!!!!!!! Why a write error when I am reading?

I have set the line size in the utl_file.FOPEN and utl_file.read_line to 998

Is this a bug?  

        original_kic_file_handle :=
utl_file.FOPEN(var_transfer_dir,var_file_name||'.KIC','r',998);              

         utl_file.get_line(original_kic_file_handle,var_current_line,998);

John

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: John Dunn
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Cary Millsap
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jul 09 2003 - 07:51:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US