Pages

Sunday 1 December 2013

Undo tablespace resize

To check your undo tablespace info issue the following statement:
SQL> SELECT name,value FROM v$parameter WHERE name IN (‘undo_management’,'undo_tablespace’);
NAME VALUE
------------------------
undo_management AUTO
undo_tablespace UNDOTBS01
SQL>
SQL>
CREATE UNDO TABLESPACE undotbs02
DATAFILE ‘/u01/app/oracle/oradata/mydb/undotbs02.dbf’ SIZE 1024M
REUSE AUTOEXTEND ON NEXT 4096K MAXSIZE 10240M;


SQL>
ALTER SYSTEM SET undo_tablespace = ‘UNDOTBS02′;
SQL> ALTER TABLESPACE undotbs01 OFFLINE;
SQL> DROP TABLESPACE undotbs01 INCLUDING CONTENTS AND DATAFILES;
SQL>
With these steps we created a new undo tablespace, set it as the system default undo tablespace and drop the old tablespace including the datafiles.

No comments:

Post a Comment