title: utl_file.fopen without 'create directory ... as ...'
body: <p>Hi, everybody.
  I am new to PL/SQL and Oracle Databases.
  I need to read/write file that exists on server so i'm using <code>utl_file.fopen('/home/tmp/','text.txt','R')</code> but Oracle shows error 'invalid directory path'.</p>
  
  <p>Main problem is that i have only user privileges, so i cant use commands like <code>create directory user_dir as '/home/temp/'</code> or view utl_file_dir with just <code>show parameter utl_file_dir;</code>
  I used this code to view utl_file_dir:</p>
  
  <pre><code>SQL&gt; set serveroutput on;
  SQL&gt; Declare
    2      Intval number;
    3      Strval varchar2 (500);
    4      Begin
    5       If (dbms_utility.get_parameter_value('utl_file_dir', intval,strval)=0)
    6      Then dbms_output.put_line('value ='||intval);
    7      Else dbms_output.put_line('value = '||strval);
    8      End if;
    9      End;
   10  /
  </code></pre>
  
  <p>and output was 'value = 0'.</p>
  
  <p>I google'd much but didnt find any solution of this problem, so i'm asking help here.</p>
  
  <p>To read file i used this code:</p>
  
  <pre><code>    declare
      f utl_file.file_type;
      s varchar2(200);
  begin
      f := utl_file.fopen('/home/tmp/','text.txt','R');
      loop
          utl_file.get_line(f,s);
          dbms_output.put_line(s);
      end loop;
  exception
      when NO_DATA_FOUND then
          utl_file.fclose(f);
  end;
  </code></pre>