Restore Segment Purpose:
Transaction fallback--when a transaction modifies a row in a table, the old image of the modified column (the data to be restored) is stored in the restore segment. If the transaction is rolled back, the Oracle server restores the original value by writing the value from the restore segment back to that row.
Transaction Recovery--if the routine fails while the transaction is in progress, the Oracle server needs to restore all uncommitted changes when the database is opened again. This fallback operation is part of the transaction recovery process. It is possible to recover transactions because changes made to the restore segment are also protected by the Redo log file.
Read consistency--when a transaction is in progress, other users in the database should not see any uncommitted changes made by those transactions. In addition, you should not see any changes that were committed after the statement was executed from a statement. The old values in the restore segment (the data to be restored) can also be used to provide the reader with a consistent image of the given statement.
Sql> Select Tablespace_name,contents from dba_tablespaces where CONTENTS = ' UNDO '; Tablespace_name CONTENTS---------------------------------------UNDOTBS1 UNDO sql& Gt
Create undo tablespace undo1 datafile '/u01/app/oracle/oradata/orcl/undo01.dbf ' size 10m;
The table space has been created.
Sql> Select Tablespace_name,contents from dba_tablespaces where CONTENTS = ' UNDO '; Tablespace_name CONTENTS---------------------------------------UNDOTBS1 UNDO UNDO1 UNDO sql> Show parameter undo_ NAME TYPE VALUE----- ------------------------------------------------------------------------undo_management string AUTO undo_retention integer 900 undo_tablespace string UNDOTBS1 SQL
> alter system set UNDO_TABLESPACE=UNDO1;
The system has changed. Sql> Show Parameter Undo_ NAME TYPE VALUE-----------------------------------------------------------------------------undo_management String AUTO undo_retention integer 900 undo_tablespace String UNDO1
Note: Creation is the Create undo tablespace .... Delete is drop tablespace ...