-- 假如undo表空間undotbs不能釋放空間,重建之
-- 創建備用undo表空間
create undo tablespace newundotbs datafile '$ORA_DATA/newundotbs01.dbf' size 1000m
/
-- 切換undo表空間
alter system set undo_tablespace=newundotbs scope=spfile
/
shutdown immediate
/
startup
/
-- drop原表空間
drop tablespace undotbs including contents and datafiles
/
-- 創建原undo表空間
create undo tablespace undotbs datafile '$ORA_DATA/undotbs01.dbf' size 1000m
/
-- 切換undo表空間
alter system set undo_tablespace=undotbs scope=spfile
/
-- 關閉重起並把備用undo表空間drop
shutdown immediate
/
startup
/
drop tablespace newundotbs including contents and datafiles
/