Oracle 23.26SpaceLab-verified · 2026-11-29

ORA-01950: The user has insufficient quota on tablespace

The owner of the table or index has no quota on the tablespace where the segment is being created.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-01950: The user LAB_A has insufficient quota on tablespace LAB_DATA.

What changed in 26ai error messages →

Jump to a cause

  1. 01Default tablespace has no quota for the user
  2. 02Inserting into another user's table whose owner has no quota
  3. 03CREATE TABLE ... TABLESPACE x AS SELECT without quota on x
  4. 04CREATE INDEX ... TABLESPACE x without quota on x

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim

ORA-01950 used to read no privileges on tablespace 'USERS'. In Oracle 23ai/26ai it says The user LAB_A has insufficient quota on tablespace LAB_DATA., naming both the user and the tablespace. It is about quota, not about object grants.

In these runs lab_a had quota only on USERS (MAX_BYTES -1 = unlimited). The error appeared whenever a segment had to be created in LAB_DATA. CREATE TABLE alone succeeded; the error came at the first INSERT, at CREATE TABLE ... AS SELECT, or at CREATE INDEX on a table with rows. Every case was fixed by ALTER USER lab_a QUOTA ... ON lab_data run as system.

01Default tablespace has no quota for the user

lab_a's default tablespace was LAB_DATA, but dba_ts_quotas showed a quota only on USERS. CREATE TABLE orders succeeded, and the first INSERT INTO orders failed with ORA-01950 on LAB_DATA.

After ALTER USER lab_a QUOTA 100M ON lab_data; the same INSERT created 1 row.

Setup
Setuprun as system
DROP TABLESPACE IF EXISTS lab_data INCLUDING CONTENTS AND DATAFILES;
CREATE TABLESPACE lab_data DATAFILE '/opt/oracle/oradata/FREE/FREEPDB1/lab_data01.dbf' SIZE 10M REUSE;
ALTER USER lab_a DEFAULT TABLESPACE lab_data;
OUTPUT
Tablespace dropped.


Tablespace created.


User altered.
Setuprun as lab_a
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO orders VALUES (1, 100);
✕ ERROR
INSERT INTO orders VALUES (1, 100)
            *
ERROR at line 1:
ORA-01950: The user LAB_A has insufficient quota on tablespace LAB_DATA.
Help: https://docs.oracle.com/error-help/db/ora-01950/
Checkrun as system
SELECT default_tablespace FROM dba_users WHERE username = 'LAB_A';
SELECT tablespace_name, max_bytes FROM dba_ts_quotas WHERE username = 'LAB_A';
OUTPUT
DEFAULT_TABLESPACE
------------------------------
LAB_DATA

1 row selected.


TABLESPACE_NAME                 MAX_BYTES
------------------------------ ----------
USERS                                  -1

1 row selected.
Fixrun as system
ALTER USER lab_a QUOTA 100M ON lab_data;
OUTPUT
User altered.

A table with no rows may not have a segment yet, so the error can show up at the first INSERT, not at CREATE TABLE.

After the fixrun as lab_a
INSERT INTO orders VALUES (1, 100);
✓ SUCCESS
1 row created.

02Inserting into another user's table whose owner has no quota

lab_b had INSERT on lab_a.orders, but INSERT INTO lab_a.orders failed with: The user LAB_A has insufficient quota on tablespace LAB_DATA. The quota that matters belongs to the table owner, LAB_A, not to the user running the INSERT.

Giving the quota to lab_a (not lab_b) fixed it, and lab_b's INSERT created 1 row.

Setup
Setuprun as system
DROP TABLESPACE IF EXISTS lab_data INCLUDING CONTENTS AND DATAFILES;
CREATE TABLESPACE lab_data DATAFILE '/opt/oracle/oradata/FREE/FREEPDB1/lab_data01.dbf' SIZE 10M REUSE;
ALTER USER lab_a DEFAULT TABLESPACE lab_data;
OUTPUT
Tablespace dropped.


Tablespace created.


User altered.
Setuprun as lab_a
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
GRANT INSERT, SELECT ON orders TO lab_b;
OUTPUT
Table created.


Grant succeeded.
Reproducerun as lab_b
INSERT INTO lab_a.orders VALUES (1, 100);
✕ ERROR
INSERT INTO lab_a.orders VALUES (1, 100)
                  *
ERROR at line 1:
ORA-01950: The user LAB_A has insufficient quota on tablespace LAB_DATA.
Help: https://docs.oracle.com/error-help/db/ora-01950/
Checkrun as system
SELECT owner, table_name, tablespace_name FROM dba_tables WHERE table_name = 'ORDERS' AND owner IN ('LAB_A', 'LAB_B');
OUTPUT
OWNER                          TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------ ------------------------------
LAB_A                          ORDERS                         LAB_DATA

1 row selected.
Fixrun as system
ALTER USER lab_a QUOTA 100M ON lab_data;
OUTPUT
User altered.
After the fixrun as lab_b
INSERT INTO lab_a.orders VALUES (1, 100);
✓ SUCCESS
1 row created.

03CREATE TABLE ... TABLESPACE x AS SELECT without quota on x

lab_a had unlimited quota on USERS only. CREATE TABLE sales_hist TABLESPACE lab_data AS SELECT * FROM sales failed with ORA-01950 because the copy needs space in LAB_DATA.

After ALTER USER lab_a QUOTA UNLIMITED ON lab_data; the same statement created the table.

Setup
Setuprun as system
DROP TABLESPACE IF EXISTS lab_data INCLUDING CONTENTS AND DATAFILES;
CREATE TABLESPACE lab_data DATAFILE '/opt/oracle/oradata/FREE/FREEPDB1/lab_data01.dbf' SIZE 10M REUSE;
OUTPUT
Tablespace dropped.


Tablespace created.
Setuprun as lab_a
CREATE TABLE sales (sale_id NUMBER, amount NUMBER);
INSERT INTO sales SELECT level, level * 10 FROM dual CONNECT BY level <= 100;
COMMIT;
OUTPUT
Table created.


100 rows created.


Commit complete.
Reproducerun as lab_a
CREATE TABLE sales_hist TABLESPACE lab_data AS SELECT * FROM sales;
✕ ERROR
CREATE TABLE sales_hist TABLESPACE lab_data AS SELECT * FROM sales
                                                             *
ERROR at line 1:
ORA-01950: The user LAB_A has insufficient quota on tablespace LAB_DATA.
Help: https://docs.oracle.com/error-help/db/ora-01950/
Checkrun as system
SELECT tablespace_name, max_bytes FROM dba_ts_quotas WHERE username = 'LAB_A';
OUTPUT
TABLESPACE_NAME                 MAX_BYTES
------------------------------ ----------
USERS                                  -1

1 row selected.
Fixrun as system
ALTER USER lab_a QUOTA UNLIMITED ON lab_data;
OUTPUT
User altered.
After the fixrun as lab_a
CREATE TABLE sales_hist TABLESPACE lab_data AS SELECT * FROM sales;
✓ SUCCESS
Table created.

04CREATE INDEX ... TABLESPACE x without quota on x

The table sales_hist with 100 rows was in USERS. CREATE INDEX sales_hist_ix ... TABLESPACE lab_data failed with ORA-01950 on LAB_DATA.

After granting quota on LAB_DATA, the index was created.

Setup
Setuprun as system
DROP TABLESPACE IF EXISTS lab_data INCLUDING CONTENTS AND DATAFILES;
CREATE TABLESPACE lab_data DATAFILE '/opt/oracle/oradata/FREE/FREEPDB1/lab_data01.dbf' SIZE 10M REUSE;
OUTPUT
Tablespace dropped.


Tablespace created.
Setuprun as lab_a
CREATE TABLE sales_hist (sale_id NUMBER, amount NUMBER);
INSERT INTO sales_hist SELECT level, level * 10 FROM dual CONNECT BY level <= 100;
COMMIT;
OUTPUT
Table created.


100 rows created.


Commit complete.
Reproducerun as lab_a
CREATE INDEX sales_hist_ix ON sales_hist (sale_id) TABLESPACE lab_data;
✕ ERROR
CREATE INDEX sales_hist_ix ON sales_hist (sale_id) TABLESPACE lab_data
                              *
ERROR at line 1:
ORA-01950: The user LAB_A has insufficient quota on tablespace LAB_DATA.
Help: https://docs.oracle.com/error-help/db/ora-01950/
Fixrun as system
ALTER USER lab_a QUOTA UNLIMITED ON lab_data;
OUTPUT
User altered.
After the fixrun as lab_a
CREATE INDEX sales_hist_ix ON sales_hist (sale_id) TABLESPACE lab_data;
✓ SUCCESS
Index created.

FAQ

How do I fix ORA-01950 no privileges on tablespace?

As a DBA, give the owner quota on the tablespace in the message: ALTER USER lab_a QUOTA 100M ON lab_data; (or QUOTA UNLIMITED). That fixed all four cases above.

How do I check a user's tablespace quota?

Query dba_ts_quotas for the user. In these runs it showed only USERS with MAX_BYTES -1 (unlimited) and no row for LAB_DATA.

Why did CREATE TABLE work but INSERT fails with ORA-01950?

The empty table had no segment yet. Space is allocated at the first INSERT, so that is where the quota check failed.

Another user owns the table. Whose quota do I change?

The owner's. When lab_b inserted into lab_a.orders, the message named LAB_A, and the quota had to be given to lab_a.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0