Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 764 Bytes

how-to-clean-undo-tablespaces.md

File metadata and controls

37 lines (25 loc) · 764 Bytes

How to clean UNDO tablespaces

  1. Create a temporary UNDO tablespace (UNDOTBS2):
SQL> CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '/oradata/undotbs2.dbf' size 5M;
  1. Change the default UNDO tablespace to UNDOTBS2:
SQL> ALTER SYSTEM UNDO_TABLESPACE=UNDOTBS2;
  1. Remove existing UNDO tablespace (UNDOTBS1):
SQL> DROP TABLESPACE UNDOTBS1 INCLUDING CONTENTS AND DATAFILES;
  1. Create a new UNDOTBS1:
SQL> CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE '/oradata/undotbs1.dbf' size 100M;
  1. Change the default UNDO tablespace to UNDOTBS1:
SQL> ALTER SYSTEM UNDO_TABLESPACE=UNDOTBS1;
  1. Remove UNDOTBS2 (temporary UNDO tablespace):
SQL> DROP TABLESPACE UNDOTBS2 INCLUDING CONTENTS AND DATAFILES;