
💡 rollback을 가능하게 해주는 변경 전 데이터들이 저장되어 있음
💡 대량으로 데이터를 update 하거나 delete 할 때
💡 update, delete, insert 할 때 작업이 실패함
SYS @ ora19dw > show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
create undo tablespace undotbs2
datafile '/u01/app/oracle/oradata/ORA19DW/undotbs2.dbf' size 1m;
select tablespace_name, contents
from dba_tablespaces;
SYS @ ora19dw > alter system set undo_tablespace=UNDOTBS2 scope=both;
시스템이 변경되었습니다.
SYS @ ora19dw > show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
SYS @ ora19dw > connect scott/tiger
연결되었습니다.
SCOTT @ ora19dw >
SCOTT @ ora19dw > delete from mcustsum2;
delete from mcustsum
*
1행에 오류:
ORA-30036: 세그먼트를 8만큼 실행 취소 테이블스페이스 'UNDOTBS2'에서 확장할 수 없음
alter database datafile
'/u01/app/oracle/oradata/ORA19DW/undotbs02.dbf' resize 200m;

[실습6] 다시 현재 undo tablespace 를 undotbs1 로 변경하시오
SCOTT @ ora19dw > connect / as sysdba
연결되었습니다.
SYS @ ora19dw >
SYS @ ora19dw > alter system set undo_tablespace=undotbs1 scope=both;
시스템이 변경되었습니다.
SYS @ ora19dw > show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SYS @ ora19dw >
drop tablespace undotbs2 including contents and datafiles;
💡 including cotents and datafiles를 써줘야 os 관련된 datafile들도 같이 자동으로 삭제됨