Team,
the below demo was from my Free Tier ATP 19c instance.
though we set "enablelogs" to False, can you help me to understand why still we need read and write privilege on the default directory "DATA_PUMP_DIR"?
demo_user@ATP19C> select utl_raw.cast_to_varchar2(dbms_cloud.get_object('my_demo_cred',:filename)) from dual;
UTL_RAW.CAST_TO_VARCHAR2(DBMS_CLOUD.GET_OBJECT('MY_DEMO_CRED',:FILENAME))
-------------------------------------------------------------------------
"EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO"
7369,"SMITH","CLERK",7902,17-DEC-1980 12:00:00 AM,800,,20
7499,"ALLEN","SALESMAN",7698,20-FEB-1981 12:00:00 AM,1600,300,30
7521,"WARD","SALESMAN",7698,22-FEB-1981 12:00:00 AM,1250,500,30
7566,"JONES","MANAGER",7839,02-APR-1981 12:00:00 AM,2975,,20
7654,"MARTIN","SALESMAN",7698,28-SEP-1981 12:00:00 AM,1250,1400,30
7698,"BLAKE","MANAGER",7839,01-MAY-1981 12:00:00 AM,2850,,30
7782,"CLARK","MANAGER",7839,09-JUN-1981 12:00:00 AM,2450,,10
7788,"SCOTT","ANALYST",7566,19-APR-0087 12:00:00 AM,3000,,20
7839,"KING","PRESIDENT",,17-NOV-1981 12:00:00 AM,5000,,10
7844,"TURNER","SALESMAN",7698,08-SEP-1981 12:00:00 AM,1500,0,30
7876,"ADAMS","CLERK",7788,23-MAY-0087 12:00:00 AM,1100,,20
7900,"JAMES","CLERK",7698,03-DEC-1981 12:00:00 AM,950,,30
7902,"FORD","ANALYST",7566,03-DEC-1981 12:00:00 AM,3000,,20
7934,"MILLER","CLERK",7782,23-JAN-1982 12:00:00 AM,1300,,10
emo_user@ATP19C> create table emp_demo as
2 select *
3 from demo.emp
4 where 1 = 0 ;
Table created.
demo_user@ATP19C> begin
2 dbms_cloud.copy_data(
3 table_name =>'emp_demo',
4 credential_name =>'my_demo_cred',
5 file_uri_list => :filename,
6 format => json_object('delimiter' value ',',
7 'dateformat' value 'dd-mon-yyyy hh12:mi:ss am',
8 'quote' value '"','enablelogs' value false,
9 'skipheaders' value '1') );
10 end;
11 /
begin
*
ERROR at line 1:
ORA-20000: ORA-06564: object DATA_PUMP_DIR does not exist
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 1693
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 8286
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 8309
ORA-06512: at line 2
demo_user@ATP19C>
demo_user@ATP19C> conn admin/"********"@atp19c
Connected.
admin@ATP19C> grant write on directory data_pump_dir to demo_user;
Grant succeeded.
admin@ATP19C> conn demo_user/"********"@atp19c
Connected.
demo_user@ATP19C> begin
2 dbms_cloud.copy_data(
3 table_name =>'emp_demo',
4 credential_name =>'my_demo_cred',
5 file_uri_list => :filename,
6 format => json_object('delimiter' value ',',
7 'dateformat' value 'dd-mon-yyyy hh12:mi:ss am',
8 'quote' value '"','enablelogs' value false,
9 'skipheaders' value '1') );
10 end;
11 /
begin
*
ERROR at line 1:
ORA-20000: ORA-06564: object DATA_PUMP_DIR does not exist
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 1693
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 8286
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 8309
ORA-06512: at line 2
demo_user@ATP19C> conn admin/"********"@atp19c
Connected.
admin@ATP19C> grant read on directory data_pump_dir to demo_user ;
Grant succeeded.
admin@ATP19C> conn demo_user/"********"@atp19c
Connected.
demo_user@ATP19C> begin
2 dbms_cloud.copy_data(
3 table_name =>'emp_demo',
4 credential_name =>'my_demo_cred',
5 file_uri_list => :filename,
6 format => json_object('delimiter' value ',',
7 'dateformat' value 'dd-mon-yyyy hh12:mi:ss am',
8 'quote' value '"','enablelogs' value false,
9 'skipheaders' value '1') );
10 end;
11 /
PL/SQL procedure successfully completed.
demo_user@ATP19C> select * from emp_demo;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- ----------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-0087 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-0087 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
14 rows selected.
demo_user@ATP19C>