首页 > 其他 > 详细

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

时间:2018-07-18 13:16:25      阅读:209      评论:0      收藏:0      [点我收藏+]

--根据上述查询,可以构建针对空表分配空间的命令语句,如下:
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;

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!