Util_file.INVALID_OPERATION

I've got the above error when i tried the following code:
fopen(location,filename,'w');
what does the error mean???
Any help? many thanks!

Hi,
I've already updated the init.ora file and restarted the database. And I'm still having the error..
I've used a mapped directory (h: drive), does that matter?
The following is my codes (it juz a simple write operation):
set serveroutput on
declare
op_file UTL_FILE.file_type;
BEGIN
op_file := utl_file.fopen('h:\output','temp.txt','W');
utl_file.fclose(op_file);
END;
null

Similar Messages

  • UTIL_FILE.FOPEN

    Hi
    I am trying to open one file using UTIL_FILE.FOPEN and log the error msgs into the file
    But the file is not getting created in the path specified
    DECLARE
    CURSOR CUR_ERR_HEADER IS
    SELECT PRODUCT_CODE || '|' || PRODUCT_CODE_TYPE || '|' ||
    PRODUCT_CODE_VARIANT || '|' || PRODUCT_CODE_FRMT || '|' || PRODUCT_NAME || '|' ||
    PROD_ATTRIBUTE_CHAR|| '|' || INVENTORY_ITEM_ID || '|' ||
    GTIN_NUMBER || '|' || PRODUCT_UOM || '|' ||
    LOCATION || '|' || ERROR_MESSAGE || '|' || ERROR_CODE OUTPUT
    FROM GE_OPSM_PROD_STG
    WHERE BATCH_ID = 42
    AND STATUS ='E';
    V_ERR_FILE UTL_FILE.FILE_TYPE := NULL;
    DET_DESC VARCHAR2(100);
    HEADER_DESC VARCHAR2(250);
    V_TITLE VARCHAR2(100);
    V_CHKERR_CNT NUMBER;
    BEGIN
    DBMS_OUTPUT.PUT_LINE('Inside Error function');
    V_ERR_FILE:= UTL_FILE.FOPEN('/export/home/gemsadmin', 'Dataitem1.dat', 'w', 32767);
    DBMS_OUTPUT.PUT_LINE('creating the data file');
    FOR CUR_ERR_HEADER_REC IN CUR_ERR_HEADER LOOP
    DBMS_OUTPUT.PUT_LINE('Inside Loop');
    UTL_FILE.PUT_LINE(V_ERR_FILE, CUR_ERR_HEADER_REC.OUTPUT);
    END LOOP;
    UTL_FILE.FCLOSE(V_ERR_FILE);
    EXCEPTION
    WHEN OTHERS THEN
    UTL_FILE.FCLOSE(V_ERR_FILE);
    END ;
    Getting output as
    Inside Error function
    its not Creating the data file in the path specified. can anyone help out inthis

    CUR_ERR_HEADER_REC is cursor variable for cursor CUR_ERR_HEADER.
    My apologies I misread above line.Replace like below:
    --UTL_FILE.PUT_LINE(V_ERR_FILE, CUR_ERR_HEADER_REC.OUTPUT);
    UTL_FILE.PUT_LINE(V_ERR_FILE, 'Inserting Data here');
    Are you checking the file in right path? I believe that WRITE access has been given to the user on the directory as you are not getting any exception.
    Here is a sample code created for you.Please check it.
    --log in as DBA if you privilege AND CREATE THE DIRECTORY
    SQL> CREATE OR REPLACE DIRECTORY BI_DIR AS '/export/home/gemsadmin';--specify the path
    SQL> GRANT READ, WRITE ON DIRECTORY BI_DIR TO SCOTT;
    --PROCEDURE CREATED IN SCOTT SCHEMA
    CREATE OR REPLACE PROCEDURE GENERATECSV
        AS
        ecomm_directory     VARCHAR2(30) := 'BI_DIR';
        l_filename     VARCHAR2 (100) := 'test.csv';
        V_ERR_FILE          UTL_FILE.FILE_TYPE;
        CURSOR CUR_ERR_HEADER IS
        SELECT 'A' data FROM DUAL
        UNION  ALL
        SELECT 'B' data FROM DUAL;
       BEGIN   
         v_file := UTL_FILE.FOPEN (ecomm_directory, l_filename, 'W', 32767);
         FOR CUR_ERR_HEADER_REC IN CUR_ERR_HEADER LOOP
             UTL_FILE.PUT_LINE (V_ERR_FILE, CUR_ERR_HEADER_REC.data);
         END LOOP;
         UTL_FILE.FFLUSH (V_ERR_FILE);
         UTL_FILE.FCLOSE (V_ERR_FILE);
       EXCEPTION
         WHEN utl_file.invalid_mode THEN
         DBMS_OUTPUT.PUT_LINE('Error1:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.invalid_path THEN
         DBMS_OUTPUT.PUT_LINE('Error1:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.invalid_filehandle THEN
         DBMS_OUTPUT.PUT_LINE('Error2:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.invalid_operation THEN
         DBMS_OUTPUT.PUT_LINE('Error3:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.read_error THEN
         DBMS_OUTPUT.PUT_LINE('Error4:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.write_error THEN
         DBMS_OUTPUT.PUT_LINE('Error5:'||SUBSTR(SQLERRM,1,255));
         WHEN utl_file.internal_error THEN
         DBMS_OUTPUT.PUT_LINE('Error6:'||SUBSTR(SQLERRM,1,255));
       END GENERATECSV ;
    /--Now you are executing the procedure from SCOTT SCHEMA
    SQL> exec GENERATECSV;Regards
    Biju
    Edited by: biju2012 on Aug 22, 2012 4:42 AM

  • UTIL_FILE

    Hi Oracle GURUs ,
    I have a problem in outputing the content of a text file on the server using UTIL_FILE .When I execute this code , it is creating PL/SQL procedure successfully but without giving the output ....Here is the code :
    DECLARE
    DATA_LINE VARCHAR2(50);
    FILE_HANDLE UTL_FILE.FILE_TYPE;
    BEGIN
    FILE_HANDLE := UTL_FILE.FOPEN('D:\WORK', 'TEST', 'R');
    UTL_FILE.GET_LINE(FILE_HANDLE,DATA_LINE);
    UTL_FILE.FCLOSE(FILE_HANDLE);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE('READ PAST EOF');
    WHEN OTHERS THEN
    UTL_FILE.FCLOSE(FILE_HANDLE);
    END;
    My guess is that it is rasing WHEN OTHERS exception .....Am I missing something ...Please help......
    TIA

    Try to use the following to trap the exception and check if you have setup the parameter utl_file_dir properly ^_^
    exception
    when utl_file.invalid_path then
    dbms_output.put_line('Invalid Path');
    when utl_file.invalid_mode then
    dbms_output.put_line('Invalid Mode');
    when utl_file.invalid_filehandle then
    dbms_output.put_line('Invalid Filehandle');
    when utl_file.invalid_operation then
    dbms_output.put_line('Invalid Operation');
    when utl_file.read_error then
    dbms_output.put_line('Read Error');
    when utl_file.write_error then
    dbms_output.put_line('Write Error');
    when utl_file.internal_error then
    dbms_output.put_line('Internal Error');
    Rgds,
    Edward

  • Util_file package error

    Hi ,
    I am using util_file package to spool to a csv file in a stored procedure .
    when I call this procedure on my loacl machine is woking fine .
    But when I call this procedure in the apps oracle database ,I get the following error:
    ORA-20003: File could not be opened or operated on as requested.
    ORA-06512: at "APPS.WOC_KDE_PREPROCESSOR", line 1032
    Please suggest.
    Thanks,

    Here is my code :
    CREATE OR REPLACE PACKAGE BODY Woc_KDE_Preprocessor
    AS
    NAME: Woc_Delete_Model_Data
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 11/01/2008 gtutika 1. Preprocessor to Spool in CSV file
    PROCEDURE KDEPreprocessor(p_con_program_id NUMBER)
    IS
         v_file UTL_FILE.FILE_TYPE;
         l_count NUMBER;
         l_product_model VARCHAR2(40);
         c_family VARCHAR2(40);
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    DBMS_OUTPUT.PUT_LINE('before');
         v_file := UTL_FILE.FOPEN(location => 'EXTRACT_DIR',
    filename => 'KDEPreprocessor-'||p_con_program_id||'.csv',
    open_mode => 'w',
    max_linesize => 32767);
         DBMS_OUTPUT.PUT_LINE('after');
         UTL_FILE.FCLOSE(v_file);
         EXCEPTION
              WHEN UTL_FILE.INVALID_PATH THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20000, 'File location is invalid.');
              WHEN UTL_FILE.INVALID_MODE THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20001, 'The open_mode parameter in FOPEN is invalid.');
              WHEN UTL_FILE.INVALID_FILEHANDLE THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20002, 'File handle is invalid.');
              WHEN UTL_FILE.INVALID_OPERATION THEN
    dbms_output.put_line('(SQLERRM');
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20003, 'File could not be opened or operated on as requested.');
    -- dbms_output.put_line('(SQLERRM');
              WHEN UTL_FILE.READ_ERROR THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20004, 'Operating system error occurred during the read operation.');
              WHEN UTL_FILE.WRITE_ERROR THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20005, 'Operating system error occurred during the write operation.');
              WHEN UTL_FILE.INTERNAL_ERROR THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20006, 'Unspecified PL/SQL error.');
              WHEN UTL_FILE.CHARSETMISMATCH THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20007, 'A file is opened using FOPEN_NCHAR, but later I/O ' ||
                             'operations use nonchar functions such as PUTF or GET_LINE.');
              WHEN UTL_FILE.FILE_OPEN THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20008, 'The requested operation failed because the file is open.');
              WHEN UTL_FILE.INVALID_MAXLINESIZE THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20009, 'The MAX_LINESIZE value for FOPEN() is invalid; it should ' ||
                             'be within the range 1 to 32767.');
              WHEN UTL_FILE.INVALID_FILENAME THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20010, 'The filename parameter is invalid.');
              WHEN UTL_FILE.ACCESS_DENIED THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20011, 'Permission to access to the file location is denied.');
              WHEN UTL_FILE.INVALID_OFFSET THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20012, 'The ABSOLUTE_OFFSET parameter for FSEEK() is invalid; ' ||
                             'it should be greater than 0 and less than the total ' ||
                             'number of bytes in the file.');
              WHEN UTL_FILE.DELETE_FAILED THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20013, 'The requested file delete operation failed.');
              WHEN UTL_FILE.RENAME_FAILED THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE_APPLICATION_ERROR(-20014, 'The requested file rename operation failed.');
              WHEN OTHERS THEN
              UTL_FILE.FCLOSE(v_file);
              RAISE;
         END;
    END;
    Show errors;
    I do not get any error with local db.But on apps I get
    UTL_FILE.INVALID_OPERATION error.

  • Getting INVALID_OPERATION  while using UTL file

    Hi,
    I have a procedure which makes different UTL files i.e data file, error file and log file for a Purchase order. These 3 sets of files are made for every purchase order.
    So suppose in a cursor i find that there are 10 Purchase orders to process, then it should create 30 UTL files 10 sets of 3 files.
    But when i run this procedure, after processing 3 PO's i.e after creating 9 files i get INVALID_OPERATION error.
    So lets say i have 10 PO's 1 to 10 , i run for first time PO 1,2 and 3 utl files are created and then i get error. Then when i run it again processes PO number 4 to 6 and then again error...
    So i want to know is there any restriction on number of UTL files you can create in a single procedure. i want urgent help, appreciate ur quick replies on this matter.
    thanks,
    Dipin

    Hi,
    There could be several reasons for this...
    1. In inti ora file, what utl file directory was specified? is it 'C:\PLXML\DBDOM'? if not check.
    2. Do u have C:\PLXML\DBDOM\Testfile.txt in your directory?
    3. If you have above file in that directory and you have opened that file for writing purpose, close that.
    Ur program looks ok. Also, dbms_output.put_line will display 255 charcters only(at least in 7.3).
    Koti.
    null

  • UTIL_File In Remote Node

    Hi,
    My Problem is that we seperated our AppServer(Solaris) and DBServer(Solaris) and some of my Script uses UTIL_FILE to write file from database,so i mounted My Appserver in DBServer so that it writes the data in Appserver only,now my Mount is working fine still i'm getting Oracle Error
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 488
    ORA-29283: invalid file operation
    And i have given the Folder Full permission(777) but still no use,
    so is that a permission issue or My SP is not working

    Hi,
    has the user already assigned Write Privilege to the Virtual Directory.
    777 is in the OS Level, but in the DB Level, SYS need to grant privilege to the user.
    HTH

  • How to rename a file once it is created with util_file utility.

    Hi,
    A flat file is generated with util_file utility, now we want to rename the file using utilities available with Oracle. Can any body give any solution..?, Any package is available...?
    Regards,
    G. Rajakumar.

    Hi Raja
    If you are using Oracle 8i or later version you can easily do it writing a Java stored procedure and calling it,
    in your PL/SQL wrapper function.
    I recently had a similar problem and did it successfully.
    If you need the code along with the wrapper function, I can send it to you on your e-mail.
    Qurashi

  • UTIL_FILE Directory Creation

    Is there a way to define a directory tree as usable by UTIL_FILE, and have subdirectories within that tree inherit the permissions?
    For instance:
    1) Define '/u01/util_area' as a node with which to use UTIL_FILE;
    2) Then create a subdirectory '/u01/util_area/new_function', allowing use of UTIL_FILE (without the DBA having to specify the 'new_function' directory)

    The answer is NO. You have to create different directory objects in database for your different subdirectoy/directory structures.
    Daljit Singh

  • Util_File package with multiple users

    I am using util_file package to spool data into file . I have two users with different data . I have given access to both the users to execute util_file package .
    Now how does my stored procedure knows which user's data to take .
    Thanks,

    You are asking the wrong question. Your procedure doesn't need to know whose data to take. UTL_FILE file handles are private to the session.
    Your application design does need to keep different sessions writing to different files. You can't have both sessions open the same file for writing (or if you do, the results are unpredictable, particularly if both sessions attempt to write simultaneously.
    This is exactly the same as when you write to a file from a C program.
    Your best options are
    1) make the file name contain a username, and each user has his own file
    2) write all data to a single file, and protect each write
       - grab a user lock (use DBMS_LOCK package)
       - open the file for append
       - write to the file
       - close the file
       - release the lockHTH
    Regards Nigel

  • Replacement for UTIL_FILE exception of NO_DATA_FOUND

    A few years ago, I had code that processed an exception called: UTL_FILE.NO_DATA_FOUND. In fact, I have used this in cursors as well and have found that this does not work. What is the replacement?

    I am responding to my own question. Looks like it was changed to UTIL_FILE.NO_DATA_FOUND to NO_DATA_FOUND.
    Sorry for the question.
    Thanks

  • Problem with UTIL_FILE

    Hi
    I have created a procedure using UTL_FILE.
    Before executing the procedure i created a directory as
    connect system/system;
    grant execute on sys.utl_file to PUBLIC;
    alter system set processes=500 scope=spfile;
    grant read, write on directory gams to public;
    connect san/san;
    create or replace directory gams as 'C:\gamsdir';
    CREATE OR REPLACE PROCEDURE Empl
    IS
    f utl_file.file_type;
    begin
    f := utl_file.fopen('GAMS', 'test.txt', 'w');
    utl_file.put_line(f, 'line one: some text');
    utl_file.put_line(f, 'line two: more text');
    utl_file.fclose(f);
    end;
    It gives the errors as
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 475
    ORA-29283: invalid file operation
    ORA-06512: at "SAN.EMPL", line 5
    ORA-06512: at line 1
    How can i create the directory?
    How can i create the utl_file_dir and how can i set that directory in init.ora?
    what can i do?
    Any Help???
    Thank you

    > Can I create the directory in server?
    I do not know.. do you have access to the server? Can you logon to the server and access the file system of that server?
    > Please tell me indetail.
    Assuming that you can logon to that server - simply use a Windows Command Console and the MKDIR command to create the physical directory on the server.
    Or use Explorer.
    Also remember to make sure that this new directory can be used by Oracle. (e.g. in Explorer right click on the folder and set the permissions for that folder to allow the Oracle windows user to read/write to this folder)

  • Util_file.fgetattr    'file does not exist'

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    The file exists and thesqldr uses this file. Here is my code.
    set serveroutput on
    DECLARE
    v_dir VARCHAR2(200); -- Directory containing the data file
    v_filename VARCHAR2(100); -- Data filename
    v_file_exists boolean;
    v_file_length number;
    v_block_size number;
    BEGIN
    v_dir := '\\nrs2\WEBSITE\INCOMING\STARPUBS\';
    v_filename := 'PC.ORDERS';
    DBMS_OUTPUT.PUT_LINE(v_filename); --shows filename
    DBMS_OUTPUT.PUT_LINE(v_dir); --shows directory
    utl_file.fgetattr(v_dir, v_filename, v_file_exists, v_file_length ,v_block_size );
    IF v_file_exists THEN
    dbms_output.put_line('File Exists');
    ELSE
    dbms_output.put_line('File Does Not Exist');
    END IF;
    END;
    Output:
    SQL> @C:\STARPUBS\STARPUBS\dataformats\sql\fileOrderscheck.sql
    PC.ORDERS
    \\nrs2\WEBSITE\INCOMING\STARPUBS\
    File Does Not Exist
    PL/SQL procedure successfully completed.

    Create or replace the directory locally works:
    create or replace directory USER_DIR as 'D:\wkdir';
    grant read on directory USER_DIR to USER;
    However when creating a directory to another network file on another server it says file doesn't exist
    create or replace directory SYS_DIR as ''\\nrs2\WEBSITE\INCOMING\STARPUBS\';
    grant read on directory SYS_DIR to USER;
    The nrs2 server is used as a file server and doesn't have oracle client.
    So my question is can the CREATE Directory statement manage access to another file system or is it limited to only local files?
    If so, is there another way of accessing these files in the nrs2 server using UTL_FILE package?
    Thanks
    Mike.

  • SYS.UTIL_FILE

    Connected to Oracle Database 10g Enterprise Edition Release 10.1.0.5.0
    We have this working fine on this version database
    Connected to Oracle Database 11g Release 11.2.0.1.0
    Created a directory 'TEST_DIR' with a path of \\1234-winxp\temp <-- This is a directory on a PC with sharing options to everyone
    declare
         output_file utl_file.file_type;
              v_path      VARCHAR2(20) := TEST_DIR';
              v_filename  VARCHAR2(10) := 'x.txt';
                  v_text      VARCHAR2(32000);
    BEGIN
         output_file := utl_file.fopen(upper(v_path),
                                                   v_filename,
                                                   'w',
                                                   32767);
              utl_file.put(output_file,
                              v_text);
              utl_file.fclose(output_file); ....
    END;when I run this code in 11g database, file gets written, everything is okay, please note that 11g database is on a windows server, the 10g is on OPEN VMS
    When I run this code in 10g database, we get these errors
    ORA-29283: Invalid file operation
    ORA-06512: at SYS.UTL_FILE line 457
    ORA-29283: invalid file operation
    I've searched forum/google to no avail.
    The permissions are identical in both databases.
    can anyone please shed some light as to what I am missing?
    thanks in advance.

    A file share on Windows is done using Microsoft's NTLM (New Technology Lan Manager) networking and application protocols.
    For a client to access and use that share, it needs to be a NTLM client. This means the client needs to talk to a NetBIOS interface/driver that creates SMBs (Server Message Blocks) for communicating with the NTLM server.
    You can not simply point an Oracle directory object to a NTLM share and expect it to magically just work.
    That Oracle server needs to support NTLM. It needs to authenticate itself with the NTLM file server. It need to use SMBs to read and write files to and from that NTLM file server.
    So do you have NTLM support on your OpenVMS server? Does it have some kind of NetBIOS interface that the o/s can use to talk SMB?
    On Linux there is Open Source s/w called Samba that implements SMB support - and Samba clients and servers can talk to Microsoft NTLM/CIFS clients and servers.
    What do you have installed and configured on your OpenVMS server to support SMB?
    PS. Like a FTP client and FTP server are needed on the client and server side to talk FTP and transfer files, a Windows share needs specific s/w on the client, and specific s/w on the server, for the client and server to transfer file data using SMB (or what Microsoft arrogantly calls CIFS).

  • Read / Write Excel file using package dbms_util and util_files

    hi,
    i am beginner to this so please elaborate the answer more concisely

    there's a ton of reading on this subject on google my friend.
    http://www.google.co.uk/search?hl=en&source=hp&biw=954&bih=517&q=plsql+read+write+excel&btnG=Google+Search&aq=f&aqi=&aql=&oq=plsql+read+write+excel
    and check the forum faq, there's a topic on excel in here:
    SQL and PL/SQL FAQ
    Edited by: smon on Mar 2, 2011 3:39 AM

  • Error handler for ORA-29283 - not working

    I am running Oracle 9.2.0.4 on HP-UX.
    I have a stored procedure which reads a text file. I have set up an execption for error code ORA-29283 (invalid file operation). When I test my procedure (by not having the file to read) my exception handler is bypassed for a general exception error and my procedure terminates.
    here's parts of my code:
    Declare
    file_not_found EXCEPTION;
    PRAGMA EXCEPTION_INIT (file_not_found, -29283);
    BEGIN
    nochourly_file := UTIL_FILE.fopen('/mydirectory','myfile.txt','R');
    Loop
    begin
    UTL_FILE.get_line(nochourly_file, sbuffer);
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    GOTO end_of_file;
    WHEN file_not_found
    THEN
    DBMS_OUTPUT.put_line ('Invalid File Operation - file not found');
    skip_last_hour_processed;
    GOTO end_of_file;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := SUBSTR (SQLERRM, 1, 100);
    DBMS_OUTPUT.put_line ('Error ' || TO_CHAR (err_num));
    DBMS_OUTPUT.put_line (err_msg);
    DBMS_OUTPUT.put_line (sbuffer);
    RAISE;
    EXIT;
    END;
    ===============
    When this fails I expect to see the message
    "Invalid file operation - file not found"
    which indicates my exception handler was processed.
    Instead I see:
    SQL> @$HOME/newhourly_dly
    Begin processing at 20060627154321
    nlasthourprocessed:20060627100000
    Last Hour Processed is 20060627100000
    BEGIN noc_hourly_daily_load; END;
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 449
    ORA-29283: invalid file operation
    ORA-06512: at "HNS.NOC_HOURLY_DAILY_LOAD", line 374
    ORA-06512: at line 1
    Elapsed: 00:00:00.05
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    Can you explain:
    1) what generated the error message since
    a. it wasn't my exception handler and
    b. it wasn't the "WHEN OTHERS"
    2) Why isn't my error handler working?
    Please advise.
    Thank you

    Hello
    Not sure why your exception is being ignored but usually, to be able to handle the UTL_FILE exceptions, you need to explicitly code for each exception declared in the UTL_FILE package i.e.
    EXCEPTION
          WHEN utl_file.invalid_path THEN
                 --Do something
          WHEN utl_file.invalid_mode THEN
                 --Do something
          WHEN utl_file.invalid_filehandle THEN
                 --Do something
          WHEN utl_file.invalid_operation THEN
                 --Do something
          WHEN utl_file.read_error THEN
                 --Do something
          WHEN utl_file.write_error THEN
                 --Do something
          WHEN utl_file.internal_error THEN
                 --Do something
    END;HTH
    David

Maybe you are looking for

  • Problem with gross requirement planning pir is not getting reduced

    Dear Gurus I am trying to use strategy 11 for a particular finished product.(having bom and routing) In the material master I have set mrp type pd lot size ex .strategy group 11, mixed mrp 2,item category group norm, availabilty checking group 02 . T

  • IDT PC has stopped working

    upon updating IDT audio and reset my laptop came along this error message, saying that my IDT PC has stopped working due to a problem....after that my HP Compaq Presario CQ45 cannot play sound via speaker but headset can....any help on this????

  • HAWA Materials

    Dear SAP Experts . With repect to My earlier Question in foroum SAP SD[https://www.sdn.sap.com/irj/sdn/forums] In One Scenerio We have Trading Goods HAWA materials . Now CLient Wnats to See the profitability Analysis.. As Selling its on a Particular

  • Use of field selection Key.

    Hello I am implementing  the release strategy for the Purchase requisition. can anyone please tell me what is the significance of "Field selection key" and "Value change" under the release indicator. Regards

  • Embed a pdf into captivate and publish in LMS?

    I am able to embed a .pdf into captivate 7. I have altered the imsmanifest and added the documents and when I test it, it works! BUT when I zip the file it will not work?