oracle11g 数据库导出报“ EXP-00003: 未找到段 (0,0) 的存储定
原文链接:http://www.52php.cn/article/p-hludzoak-tr.html 导出oracle11.2.0.2的服务器的数据时,报“EXP-00003: 未找到段 (0,0) 的存储定义”错误。初步分析是由于数据表是空表导致该问题。 Oracle 11G在用EXPORT导出时,空表不能导出。 解决方法:一、 insert一行,再rollback就产生segment了。 alter system setdeferred_segment_creation=false scope=both;
需注意的是:该值设置后对以前导入的空表不产生作用,仍不能导出,只能对后面新增的表产生作用。如需导出之前的空表,只能用第一种方法。 select'alter table '||table_name||' allocate extent;' from user_tables wherenum_rows=0;
把查询结果导出,执行导出的语句,强行修改segment值,然后再导出即可导出空表 set heading off;
set echo off;
set feedback off;
set termout on;
spool C:alterTableSql.sql;
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
spool off;
自动将空表更新sql生成到C盘根目录的alterTableSql.sql文件中。然后执行该sql文件更新数据库。 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' ; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |