Thanks Gints,

this was the problem!

Tamas

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@GEOME       To:     Multiple recipients of list
ORACLE-L <[EMAIL PROTECTED]>       
                    TRIA.hu>             cc:

                    Sent by:             Subject:     RE: utl_file example

                    [EMAIL PROTECTED]

                    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:[EMAIL PROTECTED]]
     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.





     [EMAIL PROTECTED]> ;
       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;
     [EMAIL PROTECTED]> /


     PL/SQL procedure successfully completed.


     [EMAIL PROTECTED]>
     [EMAIL PROTECTED]>


     HTH.


     Rgds,
     Nirmal,


          -----Original Message-----
          From:   Szecsy Tamas [SMTP:[EMAIL PROTECTED]]
          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: [EMAIL PROTECTED]


          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: [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.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

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: [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.com
--
Author: Szecsy Tamas
  INET: [EMAIL PROTECTED]

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: [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).

Reply via email to