您的位置:首页 > 博客中心 > 数据库 >

oracle11g导出空表

时间:2022-03-10 18:18

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

 

gxlsystem.com,布布扣

拷贝生成的sql,进行执行

gxlsystem.com,布布扣

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

热门排行

今日推荐

热门手游