您的位置:首页 > 数据库 > Oracle

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

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

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

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

2、 alter system set deferred_segment_creation=false;

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

select table_name,num_rows from user_tables where num_rows=0;

select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0


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

exp lsp/123@127.0.0.1:1521/orcl file=d:\111.dmp

imp lsp1/123@orcl file=d:/111.dmp full=y
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: