--删除空的表空间,但是不包含物理文件
drop tablespace tablespace_name;
--删除非空表空间,但是不包含物理文件
drop tablespace tablespace_name including contents;
--删除空表空间,包含物理文件
drop tablespace tablespace_name including datafiles;
--删除非空表空间,包含物理文件
drop tablespace tablespace_name including contents and datafiles;
--如果其他表空间中的表有外键等约束关联到了本表空间中的表的字段,就要加上CASCADE CONSTRAINTS
drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;

 

Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下

对于单个user和tablespace 来说, 可以使用如下命令来完成。

步骤一:  删除user

drop user ×× cascade

说明: 删除了user,只是删除了该user下的schema objects,是不会删除相应的tablespace的。

步骤二: 删除tablespace

DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;

 

相关文章:

  • 2022-03-09
  • 2022-12-23
  • 2021-10-12
  • 2021-11-25
  • 2021-12-29
  • 2021-11-28
  • 2021-12-29
猜你喜欢
  • 2021-10-27
  • 2022-02-12
  • 2022-12-23
  • 2021-10-14
  • 2021-12-18
  • 2021-11-28
  • 2021-11-12
相关资源
相似解决方案