ORA-06510 PL/SQL: unhandled user-defined exception
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: ORA-06510 PL/SQL: unhandled user-defined exception

  1. #1
    Join Date
    Nov 2005
    Posts
    2

    ORA-06510 PL/SQL: unhandled user-defined exception

    All:
    This is in an old version of Oracle 7.3.4

    I have the following simple PL/SQL program:
    =================================================
    DECLARE
    fileHandler UTL_FILE.FILE_TYPE;
    BEGIN
    fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'w');
    UTL_FILE.PUTF(fileHandler, 'I am writing to a file!!!\n');
    UTL_FILE.FCLOSE(fileHandler);
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.');
    END;
    /

    I keep getting the following errors:

    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_FILE", line 85
    ORA-06512: at "SYS.UTL_FILE", line 120
    ORA-06512: at line 4

    BTW> I do have write permission to the directory and UTL_FILE_DIR=... is in my init.ora file.


    Any suggestions?
    Thanks,
    Last edited by ghorashy; 11-23-2005 at 01:48 PM.

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Can you post the output of the following SQL?

    select * from all_directories

    Also, PUTF needs format.
    PROCEDURE UTL_FILE.PUTF
    (file IN FILE_TYPE
    ,format IN VARCHAR2
    ,arg1 IN VARCHAR2 DEFAULT NULL
    ,arg2 IN VARCHAR2 DEFAULT NULL
    ,arg3 IN VARCHAR2 DEFAULT NULL
    ,arg4 IN VARCHAR2 DEFAULT NULL
    ,arg5 IN VARCHAR2 DEFAULT NULL);

    Tamil
    Last edited by tamilselvan; 11-23-2005 at 09:16 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width