UNDOTBS01.DBF,是表空间文件,主要就是为了undo,即撤销、回滚,只要有DML操作等,就会产生undo数据,久而久之会变得非常大,占用大量磁盘空间。
1、创建一个新的小空间的undo tablespace**
create undo tablespace undotBS2
datafile 'C:\Oracle\oradata\oracle\undotbs02.dbf' size 500m;
2、设置新的表空间为系统undo_tablespace**
alter system set undo_tablespace=undotBS2;
3、删除旧的表空间**
drop tablespace undotbs1 including contents;
其他方法
- 禁止undo tablespace自动增长
alter database datafile
'C:\Oracle\oradata\oracle\undotbs01.dbf' autoextend off;
- 扩大undo tablespace的大小
alter database datafile
'C:\Oracle\oradata\oracle\undotbs01.dbf' resize 1g;