utl_file access denied problem
10886Mar 24 2010 — edited Jul 29 2010Hi,
I have used utl_file routines previously without problems, so this one is puzzling.
I am getting an ACCESS_DENIED exception when attempting to open a file.
I have defined a directory object, 'LOINC_DIR' pointing to a windows xp folder. A text file, L_DB.txt is located in the folder.
In the pl/sql package function I have
F1 UTL_FILE.FILE_TYPE;
and the open statement later is
F1 := utl_file.fopen('LOINC_DIR', p_string, 'R', 32767); -- p_string contains 'L_DB.txt' as the file name.
I keep getting the ACCESS_DENIED exception.
I am running sql plus as sys/password as sysdba; The schena for the plsql package and table to be updated is 'patinfo'
iI used 'alter session set current_schema=patinfo;
The package name is load_data
I invoked the function containing the fopen with
select load_data.load_loinc(p_string) result from dual;
LOINC_DIR has read and write privileges for sys.
Any ideas,
Thanks,
Peter