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 example

RE: utl_file example

From: <G.Plivna_at_itsystems.lv>
Date: Mon, 12 Nov 2001 07:46:32 -0800
Message-ID: <F001.003C2566.20011112071522@fatcity.com>

Just in case

Do You have added correctly entries in utl_file_dir? If I remeber correctly there was a difference between Unix and NT. On one You need to put slash on the end, on another not.

Gints Plivna
IT Sistēmas, Merķeļa 13, LV1050 Rīga
http://www.itsystems.lv/gints/

                                                                                       
                            
                    Szecsy Tamas                                                       
                            
                    <tszecsy_at_GEOME       To:     Multiple recipients of list ORACLE-L 
<ORACLE-L_at_fatcity.com>       
                    TRIA.hu>             cc:                                           
                            
                    Sent by:             Subject:     RE: utl_file example             
                            
                    root_at_fatcity.c                                                     
                            
                    om                                                                 
                            
                                                                                       
                            
                                                                                       
                            
                    2001.11.12                                                         
                            
                    16:15                                                              
                            
                    Please respond                                                     
                            
                    to ORACLE-L                                                        
                            
                                                                                       
                            
                                                                                       
                            




Nirmal,

do I have to set some OS acces rights? I get the following exception:

ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at line 4

If I handle the exception it turns out that it is invalide path. The only thing I can think about is, that the sys user does not have access right to the c:\ drive. Do you know, under what account is the utl_file accessing the OS filesystem?

Tamas

     -----Original Message-----
     From: Nirmal Kumar Muthu Kumaran [mailto:NIRMALK_at_qtel.com.qa]
     Sent: Monday, November 12, 2001 1:00 PM
     To: Multiple recipients of list ORACLE-L
     Subject: RE: utl_file example



     Hi,


     Verify "UTL_FILE_DIR" init.ora parameter is defined properly.


     In FOPEN function specify, filepath and filename as separate.





     SCOTT_at_ORANS.QTEL.COM.QA> ;
       1  DECLARE
       2      fid UTL_FILE.FILE_TYPE;
       3  BEGIN
       4      fid := UTL_FILE.FOPEN('c:\','test.log','w');
       5      UTL_FILE.PUT_LINE(fid, 'Test file for usage of UTL_FILE
     package');
       6      UTL_FILE.FCLOSE(fid);
       7* END;
     SCOTT_at_ORANS.QTEL.COM.QA> /


     PL/SQL procedure successfully completed.


     SCOTT_at_ORANS.QTEL.COM.QA>
     SCOTT_at_ORANS.QTEL.COM.QA>


     HTH.


     Rgds,
     Nirmal,


          -----Original Message-----
          From:   Szecsy Tamas [SMTP:tszecsy_at_GEOMETRIA.hu]
          Sent:   Monday, November 12, 2001 1:55 PM
          To:     Multiple recipients of list ORACLE-L
          Subject:        utl_file example


          Hi,


          Sorry for the previous post with a wrong subject in it.


          Could somebody help me out with a very short utl_file example for
          Windows
          NT? I would like write error data into a simple text file, but I
          get
          exceptions.


          TIA,





          Tamas Szecsy
          --
          Please see the official ORACLE-L FAQ: http://www.orafaq.com
          --
          Author: Szecsy Tamas
            INET: tszecsy_at_GEOMETRIA.hu


          Fat City Network Services    -- (858) 538-5051  FAX: (858)
          538-5051
          San Diego, California        -- Public Internet access / Mailing
          Lists
          --------------------------------------------------------------------

          To REMOVE yourself from this mailing list, send an E-Mail message

          to: ListGuru_at_fatcity.com (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.com
--

Author:
  INET: G.Plivna_at_itsystems.lv

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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 Mon Nov 12 2001 - 09:46:32 CST

Original text of this message

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