码迷,mamicode.com
首页 > 数据库 > 详细

oracle11g导出空表

时间:2014-06-20 15:49:50      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:blog   http   ext   com   strong   数据   

ORACLE 11G在用EXP导出时,发现空表(没有数据或者没有用过的表)不能导出了。     查了一下资料,说是Oracle 11G中有个新特性,当表无数据时,不分配segment,以节省空间,所以这些表也没能导出来。用下面的SQL查询,发现不能导出的表, segment_created 字段值都是 ‘NO‘。 Select * from user_tables where segment_created = ‘NO‘;

1、执行以下语句,批量生成修改语句,在执行生成后的修改语句:

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‘;

 

bubuko.com,布布扣

拷贝生成的sql,进行执行

bubuko.com,布布扣

oracle11g导出空表,布布扣,bubuko.com

oracle11g导出空表

标签:blog   http   ext   com   strong   数据   

原文地址:http://www.cnblogs.com/czrwxw/p/3796770.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!