11G中有个新特性,当表无数据时,不分配segment,以节省空间
解决方法:
首先使用下面的sql语句查询一下当前用户下的所有空表
select table_name from user_tables where NUM_ROWS=0;
然后用一下SQL语句执行查询
select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0
假设我们这里有空表table_1,table_2,table_3,则查询结果如下:
alter table table_1 allocate extent;
alter table table_2 allocate extent;
alter table table_3 allocate extent;
最后我们把上面的SQL语句分别执行就可以了。
然后再执行导出
exp 用户名/密码@数据库名 file=/home/oracle/exp.dmp