-- Get yor DBA to do this for you before you start
-- It's necessary to connect as SYS to grant SELECT on the

-- [tables underlying] the V$ views
--
-- It's assumed that the shipped HR schema has been installed,
-- that SELECT has been granted on EMPLOYEES to PUBLIC and
-- that a public synonym has been created for EMPLOYEES


Connect sys/p@9i as sysdba

grant
  resource,
  connect

  to programmer identified by p
/
grant select on v_$parameter to programmer
/
grant execute on Dbms_Pipe to programmer
/
declare v_stmt varchar2(4000);

begin
  -- use the udump dir for convenience
  select value
    into v_stmt
    from v$parameter where name = 'user_dump_dest';
  v_stmt :=
    'create or replace directory UTL_FILE_TEST as ''' || v_stmt || '''';
  execute immediate v_stmt;

end;  
/

grant read on directory UTL_FILE_TEST to programmer
/

connect programmer/p@9i

select directory_path from all_directories

  where directory_name = 'UTL_FILE_TEST'
/
/*
DIRECTORY_PATH
----------------------------------
.../oracle/admin/[mysid]/udump
*/