| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: utl_file example
<FONT face=Arial color=#0000ff 
size=2>Nirmal,
<FONT face=Arial color=#0000ff 
size=2> 
do I 
have to set some OS acces rights? I get the following 
exception:
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>ORA-06510: PL/SQL: unhandled user-defined exceptionORA-06512: at 
"SYS.UTL_FILE", line 98ORA-06512: at "SYS.UTL_FILE", line 157ORA-06512: 
at line 4
<FONT face=Arial color=#0000ff 
size=2> 
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?
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Tamas
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2> 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Nirmal Kumar Muthu Kumaran 
  [mailto:NIRMALK_at_qtel.com.qa]Sent: Monday, November 12, 2001 1:00 
  PMTo: Multiple recipients of list ORACLE-LSubject: 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; <FONT 
  face="Courier New" color=#0000ff size=2>  3  BEGIN <FONT 
  face="Courier New" color=#0000ff size=2>  4      
  fid := UTL_FILE.FOPEN('c:\','test.log','w'); <FONT 
  face="Courier New" color=#0000ff size=2>  5      
  UTL_FILE.PUT_LINE(fid, 'Test file for usage of UTL_FILE package'); 
    
  6      UTL_FILE.FCLOSE(fid); <FONT 
  face="Courier New" color=#0000ff size=2>  7* END; <FONT 
  face="Courier New" color=#0000ff size=2>SCOTT_at_ORANS.QTEL.COM.QA> / 
  
  PL/SQL procedure successfully 
  completed. 
  SCOTT_at_ORANS.QTEL.COM.QA> 
  <FONT face="Courier New" color=#0000ff 
  size=2>SCOTT_at_ORANS.QTEL.COM.QA> 
  HTH. 
  Rgds, <FONT face=Arial 
  color=#0000ff size=2>Nirmal, 
  
-----Original Message----- <FONT
    face=Arial size=1>From:   <FONT face=Arial 
    size=1>Szecsy Tamas [SMTP:tszecsy_at_GEOMETRIA.hu] <FONT 
    face=Arial size=1>Sent:   <FONT face=Arial 
    size=1>Monday, November 12, 2001 1:55 PM <FONT face=Arial 
    size=1>To:     <FONT face=Arial 
    size=1>Multiple recipients of list ORACLE-L <FONT face=Arial 
    size=1>Subject:        <FONT 
    face=Arial size=1>utl_file example 
    size=2>-------------------------------------------------------------------- 
    To REMOVE yourself from this mailing list, send 
    an E-Mail message to: 
![]()  | 
![]()  |