扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
oracle中drop表空间中的datafile,为什么磁盘中还有这个文件?
alter tablespace test drop datafile 'E:\oracle\product\10.2.0\oradata\orcl\test02.dbf' ;
然后
select file_name from dba_data_files where tablespace = 'TEST'; 看不到test02.dbf, 可是为什么磁盘中还有这个文件? 怎样才能物理删除这个datafile?
SQL code
--删除空的表空间,但是不包含物理文件
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;
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。