My Oracle Support Banner

[ADB] ORA-20000: ORA-01950: no privileges on tablespace 'DATA' Error While Using DBMS_CLOUD.COPY_DATA (Doc ID 2699749.1)

Last updated on JULY 13, 2024

Applies to:

Autonomous Database on Shared Infrastructure - Version N/A to N/A
Information in this document applies to any platform.

Symptoms

Created one user and granted DWROLE to that user.
Logged in as that user and used DBMS_CLOUD.COPY_DATA to load data to a table created in this user that fails:


As ADMIN user:

SQL> create user adw_test identified by xxxxxx;

User ADW_TEST created.

SQL> grant dwrole to adw_test;

Grant succeeded.

Connect as adw_test user:

Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

SQL> sho user
USER is "ADW_TEST"
SQL> BEGIN
  DBMS_CLOUD.CREATE_CREDENTIAL(
    credential_name => 'TEST_CRED_NAME',
    username => 'xxxxxxx',
    password => 'xxxxxxxx'
  );
END;


PL/SQL procedure successfully completed.

SQL> CREATE TABLE CHANNELS
   (channel_id CHAR(1),
    channel_desc VARCHAR2(20),
    channel_class VARCHAR2(20)
   ); 

Table created.

SQL> select table_name,tablespace_name from user_tables;
TABLE_NAME                   TABLESPACE_NAME
-------------------------   ------------------------------
CHANNELS                         DATA

SQL> BEGIN
  2   DBMS_CLOUD.COPY_DATA(
  3      table_name =>'CHANNELS',
  4      credential_name =>'TEST_CRED_NAME',
  5      file_uri_list =>'xxxxxxxxxxxxxxxxxxxxx',
  6      format => json_object('delimiter' value ',')
 );
  7    8  END;
  9  /
BEGIN
*
ERROR at line 1:
ORA-20000: ORA-01950: no privileges on tablespace 'DATA'
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 983
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 2238
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 2261
ORA-06512: at line 2


Please note that the user was able to create CHANNELS table in same DATA tablespace but DBMS_CLOUD.COPY_DATA fails.

Same load works for ADMIN users.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.