I got ” ORA-30036: unable to extend segment by string in undo tablespace “string” ” error in Oracle database.
ORA-30036: unable to extend segment by string in undo tablespace “string”
Details of error are as follows.
ORA-30036: unable to extend segment by string in undo tablespace "string" Cause: the specified undo tablespace has no more space available. Action: Add more space to the undo tablespace before retrying the operation. An alternative is to wait until active transactions to commit.
unable to extend segment by string in undo tablespace “string”
This ORA-30036 errors are related with the specified undo tablespace has no more space available.
i) Check free space in the undo tablespace.
select sum(bytes) from dba_free_space where tablespace_name='<undo tablespace>'; select sum(bytes) from dba_data_files where tablespace_name='<undo tablespace>';
ii) Check whetherUndo tablespace datafile is autoextensible.
select autoextensible from dba_data_files where tablespace_name='<undo tablespace>;
iii) Check whether unexpired extents are available in the same segment as the current transaction.
SQL> SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*) FROM DBA_UNDO_EXTENTS GROUP BY STATUS;
In case no undo space is left, then we try to use unexpired extents (Undo Extent required to honour UNDO_RETENTION). This sometimes results in ORA-1555 errors. Now if you do not have unexpired extents also, then you need to add space to undo tablespace.
iv) Check the status of the Undo extents.
SQL> SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*),TABLESPACE_NAME FROM DBA_UNDO_EXTENTS GROUP BY STATUS,TABLESPACE_NAME;
The actions depends based on the output:
To solve this error, you can add the datafile to related undo tablespace as follows.
If you used file system, you can the datafile as follows.
ALTER TABLESPACE undotbs1 ADD DATAFILE '/path/datafilename.dbf' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED;
If you used Oracle ASM, you can add the datafile as follows.
ALTER TABLESPACE undotbs1 ADD DATAFILE '+DATA' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED;
Or you can set the UNDO_MANAGEMENT=’MANUAL’, then add datafile to undo tablespace , then Enable automatic undo management again as follows.
SQL> ALTER SYSTEM SET UNDO_MANAGEMENT='MANUAL' SCOPE=SPFILE; SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP; SQL> ALTER TABLESPACE undotbs1 ADD DATAFILE '+DATA' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED;
Now Enable automatic undo management again.
SQL> ALTER SYSTEM SET UNDO_MANAGEMENT='AUTO' SCOPE=SPFILE; SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP;
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )