Tuesday, August 18, 2015

ORA-01653: unable to extend table by in tablespace SYSTEM

If you get ORA-01653 when trying to insert data into the database, that means Oracle DB was unable to extend your tablespace, either because it reached its maximum allowed space or because autoextend is not enabled.

To solve that, first check the size of the datafiles attached to the tablespace and whether they can autoextend or not:

 select file_name, bytes, autoextensible, maxbytes from dba_data_files where
 tablespace_name='SYSTEM';

Then, add more space to that file:

 alter database datafile '/u01/app/oracle/oradata/XE/system.dbf' resize 1000m;  

And, turn the autoextend feature on:

 alter database datafile '/u01/app/oracle/oradata/XE/system.dbf' autoextend
 on next 100m maxsize 2000m;  

Alternatively, you can add a new datafile to the tablespace:

 alter tablespace SYSTEM add datafile '/u01/app/oracle/oradata/XE/system2.dbf' 
 size 100m autoextend on next 100m maxsize 2000m;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.