Oracle 11G在用EXP 导出时,空表不能导出解决

Oracle 11G在用EXP 导出时,空表不能导出解决: 11G中有个新特性,当表无数据时,不分配segment,以节省空间 解决方法:   

1、insert一行,再rollback就产生segment了。   

该方法是在在空表中插入数据,再删除,则产生segment。导出时则可导出空表。

2、 alter system set deferred_segment_creation=false;

需注意的是:该值设置后对以前导入的空表不产生作用,仍不能导出,只能对后面新增的表产生作用。如需导出之前的空表,只能用第一种方法。

1 select table_name,num_rows from user_tables where num_rows=0;
2 
3 select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0

执行查询 结果, 然后再导出。

1 exp lsp/123@127.0.0.1:1521/orcl file=d:111.dmp
2 
3 imp lsp1/123@orcl file=d:/111.dmp full=y
原文地址:https://www.cnblogs.com/lishupeng/p/5603235.html