Say you create a directory like:
CREATE OR REPLACE DIRECTORY
EXT_DATA_FILES AS
'/data/ext_data_files';
GRANT READ, WRITE ON DIRECTORY SYS.EXT_DATA_FILES TO MYAPPUSER;
I want to know if Oracle is capable of reading and writing files into that path. How could I test it?
That would help me a lot when creating external tables to avoid obscure error messages not really related to permissions error.
You can use the
UTL_FILEpackage. For example, this will verify that you can create a new file namedsome_new_file_name.txtin the directory and write data to itThis will verify that a file named
existing_file_name.txtexists and is readable