Directories let database code interact with the filesystem.

create or replace directory EXPORT_DIR as '/var/local/instance0/export';
create or replace directory IMPORT_DIR as '/var/local/instance0/import';
grant READ on directory IMPORT_DIR to APPUSER;
grant WRITE on directory EXPORT_DIR to APPUSER;

set linesize 200
col grantee format a7
col table_schema format a12
col table_name format a10
col privilege format a9
select grantee,table_schema,table_name,privilege
from all_tab_privs
where table_name = 'EXPORT_DIR' or table_name = 'IMPORT_DIR';
Advertisements