Site icon Bugra Parlayan | Oracle Database Blog

ORA-01950: No Privileges On Tablespace ‘USR_ABUZER’

ERROR :

While creating a table got ORA-01950: no privileges on tablespace ‘USERS’.

SQL> create table ABUZER.SAMPLE_TBL as select * from user_objects;
create table SAMPLE_TBL as select * from user_objects
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'USERS'

SOLUTION :

This error comes, when the user the user doesn’t have tablespace quota.

  1. Check the tablespace quota.
select username,tablespace_name,bytes/1024/1024/1024,MAX_BYTES/1024/1024/1024 from dba_ts_quotas where username='ABUZER';
 
no rows selected.
 

Grant some QUOTA to the user.

SQL> alter user ABUZER quota UNLIMITED on USERS;
 
User altered.
 
SQL> select username,tablespace_name,bytes/1024/1024/1024,MAX_BYTES/1024/1024/1024 from dba_ts_quotas where username='ABUZER';
 
 
USERNAME         TABLESPACE_NAME                BYTES/1024/1024/1024 MAX_BYTES/1024/1024/1024
---------------- ------------------------------ -------------------- ------------------------
ABUZER         USERS                                             0                        UNLIMITED

With QUOTA

SQL> alter user ABUZER quota 1G on USERS;
 
User altered.
 
SQL> select username,tablespace_name,bytes/1024/1024/1024,MAX_BYTES/1024/1024/1024 from dba_ts_quotas where username='ABUZER';
 
 
USERNAME         TABLESPACE_NAME                BYTES/1024/1024/1024 MAX_BYTES/1024/1024/1024
---------------- ------------------------------ -------------------- ------------------------
ABUZER         USERS                                             0                        1G
Exit mobile version