解决11g导出时,空表不能导出问题

--根据上述查询,可以构建针对空表分配空间的命令语句,如下:
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0

--批量输出上述生成的SQL语句,建立C:createsql.sql,其内容如下:
set heading off;
set echo off;
set feedback off;
set termout on;
spool d:/dropobj.sql;
--Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
Select 'alter table ' || table_name || ' allocate extent;' From user_tables where segment_created= 'NO';
spool off;

--执行C:createsql.sql,命令如下:
@@d:/dropobj.sql;
host del d:/dropobj.sql;

原文地址:https://www.cnblogs.com/li-sx/p/9328434.html