Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

we use a oracle db (11g release2) and the undo tablespase exists of two datafiles and requires 48 GB. But we just need this size for the boot and the import. Currently we just use 10 % from the datafiles...

Is it possible to minimize the datafiles online to the needed size ??

share|improve this question

migrated from stackoverflow.com Jan 7 at 21:07

This question came from our site for professional and enthusiast programmers.

    
This might be helpful dba-oracle.com/t_alter_database_datafile_resize.htm –  Gunjan Shakya Jan 7 at 14:42

1 Answer 1

-- create a new UNDO tablespace named UNDOTBS2

CREATE UNDO TABLESPACE undotbs2
DATAFILE '/01/oradata/dbname/undotbs201.dbf'
SIZE 50M AUTOEXTEND ON NEXT 5M;

Tablespace created.

-- Switch the database to the new UNDO tablespace.

ALTER SYSTEM SET UNDO_TABLESPACE=UNDOTBS2 SCOPE=BOTH;

-- Drop the old one

DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES;

-- If Undo is still in use

*
ERROR at line 1:
ORA-30013: undo tablespace 'UNDOTBS1' is currently in use

I would try this out first on a test database

http://www.oracleflash.com/32/Change-or-switch-undo-tablespace-in-Oracle-database.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.