-- 如果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
/
本文介绍了在Oracle数据库中,当Undo表空间无法释放空间时,如何通过创建新的Undo表空间,切换使用,然后删除原有表空间来解决空间问题。步骤包括创建备用表空间、切换使用、删除原表空间以及重新创建原表空间,并提供了详细的SQL命令。
5738

被折叠的 条评论
为什么被折叠?



