oracle11g导出DMP不能导空表解决方法

来源:互联网 发布:软件qq音乐 编辑:程序博客网 时间:2024/05/17 13:10
1、select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0
   用该语句查询数据库的空表,同时生产分配空间的语句,把导出结果保存到文件中tsv格式的,样例数据如下:
alter table TBL_PORTALWB_LINK allocate extent;
alter table TBL_VEHICLE_STORES_RELATION allocate extent;
alter table TBL_VEHICLE_STORES allocate extent;
alter table TBL_VEHICLE_PRIVATE_DETAIL allocate extent;
 
 
1.补充,若不行改用下面这个
select 'alter table '||table_name||' allocate extent(size 64k);'
     from tabs t
     where not exists (select segment_name from user_segments s where s.segment_name=t.table_name);
 
2、打开导出的文件,执行里边的sql;执行完后可对数据库进行导出
原创粉丝点击