Tuesday, April 17, 2012

Resize undo table space

1. define a new temporary undo tablespace
CREATE UNDO TABLESPACE "UNDOTBS2" DATAFILE '/ccbprod/oradata/ccbprod/UNDOTBS2.dbf' SIZE 100M
AUTOEXTEND ON NEXT 10240K MAXSIZE 32767M ;
2. issue the alter system command to point to the temporary tablespace
alter system set undo_tablespace = UNDOTBS2 ;
3. drop the original undo tablespace including datafile
drop tablespace "UNDOTBS1" INCLUDING CONTENTS AND DATAFILES ;
4. recreate the original one using the original name ( optional and size according to your needs )
CREATE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/ccbprod/oradata/ccbprod/UNDOTBS1.dbf' SIZE 100M
AUTOEXTEND ON NEXT 10240K MAXSIZE 32767M ;
5. Repeat step 2 to switch back to the original named tablespace
alter system set undo_tablespace = UNDOTBS1 ;
6. drop the tablespace created in step 1 using the syntax in step 3
drop tablespace "UNDOTBS2" INCLUDING CONTENTS AND DATAFILES ;

No comments:

Post a Comment