<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: utl_file_dir in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198080#M892237</link>
    <description>Hi Brian,&lt;BR /&gt;&lt;BR /&gt;When you say you played with the .profile did you change the PATH variable. What changes did you do. But then again you said you put back the original .profile and it works. Did you change any directory permissions in the mean while.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira A</description>
    <pubDate>Wed, 25 Feb 2004 20:07:44 GMT</pubDate>
    <dc:creator>Indira Aramandla</dc:creator>
    <dc:date>2004-02-25T20:07:44Z</dc:date>
    <item>
      <title>utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198070#M892227</link>
      <description>I'm trying to set up another directory for read/write.  The only way I can get it to work is if I put and '*' for the value.  I don't want to do that.  I can currently write to the existing ones but no new ones.  I've read the documentation and set the utl_file_dir with the new parameter on a new line, I've tried it on the same line in the init.ora file.  Oracle doesn't own the directory but is a member of the group.  I thought I had it working earlier today but now it's not working again.  Any suggestions?&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Feb 2004 12:55:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198070#M892227</guid>
      <dc:creator>Brian_274</dc:creator>
      <dc:date>2004-02-20T12:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198071#M892228</link>
      <description>1.  Is it showing up in the utl_file_dir when you query for it in the v$parameter view?  &lt;BR /&gt;&lt;BR /&gt;2.  Can oracle write to the directory (cd dir; touch hi)?&lt;BR /&gt;&lt;BR /&gt;3.  Are you getting an Oracle error when you attempt to write to a file or create a file in that directory?&lt;BR /&gt;&lt;BR /&gt;You are aware that you can't write into sub-directories under the directory specified, correct?&lt;BR /&gt;&lt;BR /&gt;The following wouldn't be valid:&lt;BR /&gt;&lt;BR /&gt;utl_file.fopen('/directory','subdirect/file.txt','W');&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Fri, 20 Feb 2004 16:45:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198071#M892228</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2004-02-20T16:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198072#M892229</link>
      <description>Hi Brian,&lt;BR /&gt;&lt;BR /&gt;Having the value  "utl_file_dir = *", would make ALL operating system directories accessible to UTL_FILE. This is not recommended since operating system permissions will most likely be circumvented - VERY RISKY. &lt;BR /&gt;&lt;BR /&gt;You can define them in two lines or a single line as you already did.&lt;BR /&gt;&lt;BR /&gt;For example: &lt;BR /&gt; &lt;BR /&gt;utl_file_dir = /tmp &lt;BR /&gt;utl_file_dir = /home/nostradamus &lt;BR /&gt; &lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;utl_file_dir = /tmp, / home/nostradamus&lt;BR /&gt;&lt;BR /&gt;If you create an spfile from a pfile with these settings, you will see that it ends up in the spfile like this: &lt;BR /&gt; &lt;BR /&gt;*.utl_file_dir='/tmp','/home/nostradamus' &lt;BR /&gt; &lt;BR /&gt;In Oracle 9i Release 2  you can create a directory within oracle and do not have to specify the util parms in your init.ora.&lt;BR /&gt;&lt;BR /&gt;But as Brian C mentioned make sure Oracle user can write to that directory by touch a text file.&lt;BR /&gt;&lt;BR /&gt;Indira A&lt;BR /&gt;</description>
      <pubDate>Sun, 22 Feb 2004 20:07:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198072#M892229</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2004-02-22T20:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198073#M892230</link>
      <description>utl_file_dir=utl_file_dir=/thpdata/thpoutput,/thpdata/weboutput,/thpdata/weboutput/report,/thpdbata/ediinput,/shdata/discfiles/iofiles&lt;BR /&gt;&lt;BR /&gt;I've tried both one line and each entry on a separate line.  I haven't tried entering them in single qoutes yet.&lt;BR /&gt;&lt;BR /&gt;When I query v$parameter it comes up the following:&lt;BR /&gt;&lt;BR /&gt;/thpdata/weboutput, /thpdata/thpoutput, /thpdata/weboutput/report, /thpdbata/ediinput, /shdata/discfiles/iofiles&lt;BR /&gt;&lt;BR /&gt;So that appears fine.  I created a basic procedure:&lt;BR /&gt;***&lt;BR /&gt;CREATE OR REPLACE PROCEDURE test_utl_file_dir  &lt;BR /&gt;as&lt;BR /&gt;   file_handle         UTL_FILE.FILE_TYPE;&lt;BR /&gt;   file_name           VARCHAR2(50);&lt;BR /&gt;   file_text           VARCHAR2(50);&lt;BR /&gt;BEGIN&lt;BR /&gt; file_text := 'test3';&lt;BR /&gt;    file_name   := 'test_utl.txt';&lt;BR /&gt;    file_handle := UTL_FILE.FOPEN('/thpdata/thpoutput', file_name ,'A');&lt;BR /&gt;&lt;BR /&gt;  UTL_FILE.PUTF(file_handle,file_text);&lt;BR /&gt;  UTL_FILE.FCLOSE(file_handle);&lt;BR /&gt;EXCEPTION&lt;BR /&gt;   WHEN utl_file.invalid_path THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20100,'Invalid Path');&lt;BR /&gt;   WHEN utl_file.invalid_mode THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');&lt;BR /&gt;   WHEN utl_file.invalid_operation THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');&lt;BR /&gt;   WHEN utl_file.invalid_filehandle THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');&lt;BR /&gt;   WHEN utl_file.write_error THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20104,'Write Error');&lt;BR /&gt;   WHEN utl_file.internal_error THEN&lt;BR /&gt;     RAISE_APPLICATION_ERROR(-20106,'Internal Error');&lt;BR /&gt;END;&lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;I run this under my account and it works fine.  I create a new user called test with only connect, unlimited tablespace and create procedure privileges and it works.  I have another user called 'ODS' and it doesn't work for that one.  The permissions for 'ODS' are the same and more.  It's the same code.  It also doesn't work from any GUI tools.  Do I have to be connected to the os in order to run it?  Here's the error msg.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; begin&lt;BR /&gt;  2  test_utl_file_dir;&lt;BR /&gt;  3  end;&lt;BR /&gt;  4  /&lt;BR /&gt;begin&lt;BR /&gt;*&lt;BR /&gt;ERROR at line 1:&lt;BR /&gt;ORA-20102: Invalid Operation&lt;BR /&gt;ORA-06512: at "ODS.TEST_UTL_FILE_DIR", line 30&lt;BR /&gt;ORA-06512: at line 2&lt;BR /&gt;****&lt;BR /&gt;Here's it working for 'test'&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; connect test/test      &lt;BR /&gt;Connected.&lt;BR /&gt;SQL&amp;gt; l&lt;BR /&gt;  1  begin&lt;BR /&gt;  2  test_utl_file_dir;&lt;BR /&gt;  3* end;&lt;BR /&gt;SQL&amp;gt; /&lt;BR /&gt;&lt;BR /&gt;PL/SQL procedure successfully completed.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; show user;&lt;BR /&gt;USER is "TEST"&lt;BR /&gt;***&lt;BR /&gt;&lt;BR /&gt;Any suggestions?</description>
      <pubDate>Tue, 24 Feb 2004 10:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198073#M892230</guid>
      <dc:creator>Brian_274</dc:creator>
      <dc:date>2004-02-24T10:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198074#M892231</link>
      <description>And just to mention this is Oracle 8.1.7.4 not 9i.  I never had a problem with this in 9i.</description>
      <pubDate>Tue, 24 Feb 2004 10:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198074#M892231</guid>
      <dc:creator>Brian_274</dc:creator>
      <dc:date>2004-02-24T10:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198075#M892232</link>
      <description>Hi try&lt;BR /&gt;create the procedure as user test and grant execute to ODS user.&lt;BR /&gt;then as user ODS&lt;BR /&gt;sqlplus&lt;BR /&gt;execute test.test_utl_file_dir&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Tue, 24 Feb 2004 10:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198075#M892232</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-02-24T10:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198076#M892233</link>
      <description>Hi Brian,&lt;BR /&gt;&lt;BR /&gt;You received an unhandled UTL_FILE.INVALID_OPERATION exception. The file cannot be created may be because of permissions in given directory or when you are trying to write to someone else's file without having proper permissions. &lt;BR /&gt;&lt;BR /&gt;Verify permissions to the directories. The file location must be an accessible directory, defined in the instance's initialization parameter UTL_FILE_DIR. &lt;BR /&gt;  &lt;BR /&gt;In normal cases, the file that is created by the FOPEN is owned by ORACLE. Files created using the FOPEN are always writable and readable using the UTL_FILE routines. User may need to get the correct privileges in order to have access to the files. &lt;BR /&gt;&lt;BR /&gt;Or may be check whether you have public synonym on UTL_FILE package and execution privileges has been granted to either public or specific user from which you execute the code.&lt;BR /&gt;&lt;BR /&gt;I hope this will help.&lt;BR /&gt;&lt;BR /&gt;Indira A&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2004 20:23:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198076#M892233</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2004-02-24T20:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198077#M892234</link>
      <description>Brian,&lt;BR /&gt;&lt;BR /&gt;In your error message, it is pointing to line "30" in the TEST_UTL_FILE_DIR procedure.  I can't see this line.  I would verify that you are running the correct code, and not an earlier version.  &lt;BR /&gt;&lt;BR /&gt;To check, run the following:&lt;BR /&gt;&lt;BR /&gt;select * from dba_source where name = 'TEST_UTL_FILE_DIR' and line = '30';&lt;BR /&gt;&lt;BR /&gt;I don't get a response after loading your code for it.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Tue, 24 Feb 2004 21:03:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198077#M892234</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2004-02-24T21:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198078#M892235</link>
      <description>hi,&lt;BR /&gt; &lt;BR /&gt;I went through metalink note 45172.1 and section quoted below:&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;2) Directories with space characters&lt;BR /&gt;------------------------------------&lt;BR /&gt;&lt;BR /&gt;For this to work the directory must be delimited by double quotes in the &lt;BR /&gt;init.ora parameter file.&lt;BR /&gt;&lt;BR /&gt;e.g. UTL_FILE_DIR="E:\LOG DIR".&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;can you please confirm that the utl_file_dir value is double-quoted in your init.ora.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;yogeeraj</description>
      <pubDate>Wed, 25 Feb 2004 00:19:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198078#M892235</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-02-25T00:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198079#M892236</link>
      <description>Ok here's the latest.&lt;BR /&gt;1. I've tried defining utl_file_dir on one line and multiple lines, no luck.&lt;BR /&gt;2. I've tried defining it with no quotes, single quotes and double quotes with no difference in the v$parameter view.&lt;BR /&gt;3. I connect to the os as oracle, then to sqlplus as ods, test and any other user and the procedure works.&lt;BR /&gt;4. I connect to the OS as the 'ods' user and it doesn't work.  Even granting execute permissions doesn't work.  I play around with the .profile it works.  I change it back to the original .profile and it still works.  I'm reloading the profile after each change using '. .profile'.  So at the moment everything is working.  If it was something in the profile then why does it work now after I've restored the original .profile?&lt;BR /&gt;5. And yes both oracle and ods user_id's have the correct permissions for the directory.  i can manually create a file on the os.&lt;BR /&gt;6. I have the correct permissions on the package because I can run it just fine when I change the directory.&lt;BR /&gt;7. Line 30 is the error handler catching the error.&lt;BR /&gt;8. And I don't have any spaces in the directory names.</description>
      <pubDate>Wed, 25 Feb 2004 11:46:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198079#M892236</guid>
      <dc:creator>Brian_274</dc:creator>
      <dc:date>2004-02-25T11:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198080#M892237</link>
      <description>Hi Brian,&lt;BR /&gt;&lt;BR /&gt;When you say you played with the .profile did you change the PATH variable. What changes did you do. But then again you said you put back the original .profile and it works. Did you change any directory permissions in the mean while.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira A</description>
      <pubDate>Wed, 25 Feb 2004 20:07:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198080#M892237</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2004-02-25T20:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198081#M892238</link>
      <description>Thank you all for your help.  Here's the latest that I've found.  After I connect to the os, as any user.  Before I thought it mattered what user I connected as.  Well that's not the case.  The problem is how I connect to sqlplus.  The user was using '@dev01.thp'.  While I was using the os .profile and setting $ORACLE_SID.  When I connect to oracle using '@dev01.thp' it doesn't work.  I exit out and reconnect without using '@dev01.thp' it works.  So does anyone know what the difference could be?  Or what os parameters are actually being set?  I opened up an iTAR and I'm still waiting for an oracle response.</description>
      <pubDate>Fri, 12 Mar 2004 16:17:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198081#M892238</guid>
      <dc:creator>Brian_274</dc:creator>
      <dc:date>2004-03-12T16:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: utl_file_dir</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198082#M892239</link>
      <description>Brian,&lt;BR /&gt;&lt;BR /&gt;1.  Check the permissions on the the $OH/bin/oracle executable.  Should be suid for oracle.  &lt;BR /&gt;&lt;BR /&gt;2.  Check what user is running the listener.  You might want to restart this, as it should be writing as oracle when connecting through SQLNet.&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Fri, 12 Mar 2004 17:50:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/utl-file-dir/m-p/3198082#M892239</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2004-03-12T17:50:14Z</dc:date>
    </item>
  </channel>
</rss>

