How to grant user space resource on the tablespace in oracle 12c

Prasanth G picture Prasanth G · Jul 1, 2017 · Viewed 16.7k times · Source

I had created a user in oracle 12c standard edition.

Now I tried to create a table using the username and password in sql developer, but I am getting the following error.

SQL Error: ORA-01950: no privileges on tablespace 'USERS'01950. 00000 -  "no privileges on tablespace '%s'"

it had also show the cause and action which is as follows:

Cause:    User does not have privileges to allocate an extent in the
       specified tablespace.
Action:   Grant the user the appropriate system privileges or grant the user
           space resource on the tablespace.

can anyone please help me out in resolving this issue. my username is c##santh

Answer

APC picture APC · Jul 1, 2017

You need to grant quota on the tablespace to the user. Tablespaces are a way of logically organising the disk space available for storage of data. Normally we would grant regular users a fixed amount of space, even in these days of "storage is cheap". For instance, this command will allow them to use 128 megabytes of storage on the USERS tablespace:

alter user c##santh quota 128M on users;

You use QUOTA UNLIMITED instead, which obviously imposes no limit on how much space the user can grab. Unlimited quota is good for an application owner schema.