RE: Urgent : UTL file problem
I sent this on June 21st. Is this a record ;-) -Original Message- From: Lord, David - CSG [mailto:[EMAIL PROTECTED]] Sent: 13 August 2002 22:24 To: Multiple recipients of list ORACLE-L Subject: RE: Urgent : UTL file problem Rings a bell. Is the directory/file writable by the ORACLE user? -- David Lord -Original Message- From: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.UTL_FILE", line 101 ORA-06512: at "SYS.UTL_FILE", line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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
Re: Urgent : UTL file problem
Hi Vijaya Try adding a when others clause to your code and print out sqlerrm and get a better idea of what the actual error is. As follows when others then dbms_output.put_line(sqlcode||' '||sqlerrm); raise_application_error(-20001,'un-handled exception from our code'); hth kind regards Pete In message [EMAIL PROTECTED], Lord, David - CSG [EMAIL PROTECTED] writes I sent this on June 21st. Is this a record ;-) -Original Message- From: Lord, David - CSG [mailto:[EMAIL PROTECTED]] Sent: 13 August 2002 22:24 To: Multiple recipients of list ORACLE-L Subject: RE: Urgent : UTL file problem Rings a bell. Is the directory/file writable by the ORACLE user? -- David Lord -Original Message- From: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Pete Finnigan Independant Consultant
RE: Urgent : UTL file problem
I have seen this error when the UTL_FILE_DIR parameter is set incorrectly. It may be a typo, the directory does not exist, or the user hase no access to it. I have also found that if the value is entered in the OEM (at least on NT), that sometimes it is not properly read. So, instead, I also update this parameter directly in the initora file and if I still have problem, copy and paste the path from the initora to your code (amazing how many times this has worked). Hope it helps (I know you are on unix, but it the same thing I use both); Also, the directory in your call MUST be the same as what is defined in the utl_file_dir parameter (you may know this, but just in case). Hannah -Original Message- From: [EMAIL PROTECTED]@SUNGARD On Behalf Of Pete Finnigan [EMAIL PROTECTED] Sent: Wednesday, August 14, 2002 6:03 AM To: Multiple recipients of list ORACLE-L Subject: Re: Urgent : UTL file problem Hi Vijaya Try adding a when others clause to your code and print out sqlerrm and get a better idea of what the actual error is. As follows when others then dbms_output.put_line(sqlcode||' '||sqlerrm); raise_application_error(-20001,'un-handled exception from our code'); hth kind regards Pete In message [EMAIL PROTECTED], Lord, David - CSG [EMAIL PROTECTED] writes I sent this on June 21st. Is this a record ;-) -Original Message- From: Lord, David - CSG [mailto:[EMAIL PROTECTED]] Sent: 13 August 2002 22:24 To: Multiple recipients of list ORACLE-L Subject: RE: Urgent : UTL file problem Rings a bell. Is the directory/file writable by the ORACLE user? -- David Lord -Original Message- From: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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
RE: Urgent : UTL file problem
Sounds like it. Give yourself a beer as a prize. ;) Jared Lord, David - CSG [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 08/14/2002 01:23 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject:RE: Urgent : UTL file problem I sent this on June 21st. Is this a record ;-) -Original Message- From: Lord, David - CSG [mailto:[EMAIL PROTECTED]] Sent: 13 August 2002 22:24 To: Multiple recipients of list ORACLE-L Subject: RE: Urgent : UTL file problem Rings a bell. Is the directory/file writable by the ORACLE user? -- David Lord -Original Message- From: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858
RE: Urgent : UTL file problem
Rings a bell. Is the directory/file writable by the ORACLE user? -- David Lord -Original Message- From: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.UTL_FILE", line 101 ORA-06512: at "SYS.UTL_FILE", line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). ** This message (including any attachments) is confidential and may be legally privileged. If you are not the intended recipient, you should not disclose, copy or use any part of it - please delete all copies immediately and notify the Hays Group Email Helpdesk at [EMAIL PROTECTED] Any information, statements or opinions contained in this message (including any attachments) are given by the author. They are not given on behalf of Hays unless subsequently confirmed by an individual other than the author who is duly authorised to represent Hays. A member of the Hays plc group of companies. Hays plc is registered in England and Wales number 2150950. Registered Office Hays House Millmead Guildford Surrey GU2 4HJ. ** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Lord, David - CSG 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).
RE: Urgent : UTL file problem
Do you miss a / at the end of the path? /torben -- Original Message -- Date: Fri, 21 Jun 2002 03:58:19 -0800 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] From: Vijaya Chander V.S [EMAIL PROTECTED] Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). Torben Holm Miracle A/S Mobil : +45 2527 7104 [EMAIL PROTECTED] http://miracleAS.dk -- 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).
Re: Urgent : UTL file problem
You are getting an unhandled exception so its not the 'invalid_path' error. Code in a handler for the other possible exceptions which should assist. hth connor --- Vijaya Chander V.S [EMAIL PROTECTED] wrote: my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). = Connor McDonald http://www.oracledba.co.uk http://www.oaktable.net Remember amateurs built the ark - Professionals built the Titanic __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?Connor=20McDonald?= 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).
RE: Urgent : UTL file problem
Do you miss a / at the end of the path? /torben -- Original Message -- Date: Fri, 21 Jun 2002 03:58:19 -0800 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] From: Vijaya Chander V.S [EMAIL PROTECTED] Subject: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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). Torben Holm Miracle A/S Mobil : +45 2527 7104 [EMAIL PROTECTED] http://miracleAS.dk -- 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).
RE: Urgent : UTL file problem
Title: RE: Urgent : UTL file problem vijay, check the permissions for the /users/vijay directory. Directories that UTL_FILE can read from and write to must have permissions of the Oracle instance owner and the user running the package. Also, utl_file_dir=* is not recommended. Catalin -Message d'origine- De: Vijaya Chander V.S [mailto:[EMAIL PROTECTED]] Date: vendredi 21 juin 2002 13:58 : Multiple recipients of list ORACLE-L Objet: Urgent : UTL file problem my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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).
RE: Urgent : UTL file problem
I think a '/' is missing after vijay. The documnentation states "The file location and file name parameters are supplied to the FOPEN function as separate strings, so that the file location can be checked against the list of accessible directories as specified in the initialization file. Together, the file location and name must represent a legal filename on the system, and the directory must be accessible" Mote however that if you define utl_file_dir=* this can override o/s level file permissions and can allow users to amend or delete files that they should not be allowed to normally. See the following notes The parameter specification UTL_FILE_DIR = * has a special meaning. This entry turns off directory access checking, and it makes any directory accessible to the UTL_FILE functions. Caution: The '*' option should be used with great caution. Oracle does not recommend that you use this option in production systems. Also, do not include '.' (the current directory for UNIX) in the accessible directories list. To ensure security on file systems that enable symbolic links, users must not be allowed WRITE permission to directories accessible by PL/SQL file I/O functions. The symbolic links and PL/SQL file I/O could be used to circumvent normal operating system permission checking and allow users read/write access to directories to which they would not otherwise have access. HTH John -Original Message- Sent: 21 June 2002 12:58 To: Multiple recipients of list ORACLE-L my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.UTL_FILE", line 101 ORA-06512: at "SYS.UTL_FILE", line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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).
Re: Urgent : UTL file problem
You should ALWAYS include the OS in your posts. I'd look to see if user oracle has write permissions into that folder/directory. Vijaya Chander V.S wrote: my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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: Charlie Mengler 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).
Re: Urgent : UTL file problem
can you create a file in /users/vijay as the user oracle? remember oracle is the writer needs access to do so. hth, gene [EMAIL PROTECTED] 06/21/02 07:58AM my prog looks like this (utl_file_dir=* is present in initSID.ora file): DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN dbms_output.put_line('1'); fileHandler := UTL_FILE.FOPEN('/users/vijay', 'myoutput.lst', 'W'); dbms_output.put_line('2'); UTL_FILE.PUTF(fileHandler, 'hai vijay \n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-2, 'ERROR: Invalid path for file.'); END; and when i am running this script i am getting a message like this: 1 DECLARE * ERROR at line 1: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at SYS.UTL_FILE, line 101 ORA-06512: at SYS.UTL_FILE, line 157 ORA-06512: at line 5 what can be the problem... regards, vijay -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vijaya Chander V.S 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: Gene Sais 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).