ORA-01658: unable to create INITIAL extent for segment in tablespace tablespace_name
The problem is caused by the Oracle unable or fails to find sufficient contiguous space to allocate INITIAL extent for segment being created, due to the data files for a tablespace specified in tablespace_name has become full, or there is not enough space in the datafile.
You can check if the datafiles available and used by Oracle’s tablespaces is autoextensible, and if there is any free space in the datafile by using the following query.
select a.file_id,b.file_name,b.autoextensible,b.bytes/1024/1024,sum(a.bytes)/1024/1024 from dba_extents a , dba_data_files b where a.file_id=b.file_id group by a.file_id,b.file_name,autoextensible,b.bytes/1024/1024
The solutions or workarounds for the ORA-01658 Oracle error include:
- Add a new datafile into the tablespace to increase additional space by using SQL query as shown:
ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name7gt; size <size>
- Retry the transaction or process with a smaller value for INITIAL.
- Set AUTOEXTEND on for the data file of the tablespace.
- Increase the size of the existing datafile by using the following SQL command:
ALTER DATABASE DATAFILE <datafile_name> RESIZE newsize;