Home >Database >Mysql Tutorial >Oracle EXP-00011 导出数据时空表报错的解决

Oracle EXP-00011 导出数据时空表报错的解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:24:481156browse

在oracle exp 导出表、数据时,碰到该问题(用10g客户端到处11g表、数据时);

在Oracle exp 导出表、数据时,碰到该问题(用10g客户端到处11g表、数据时);

解决方法如下:

1.  设置deferred_segment_creation的值为false

此方法只对以后的表有效,之前的表没有Segment的还是没有。

2.  创建表的时候声明立即创建Segment

create table XXX (XXX  XXX) SEGMENT CREATION IMMEDIATE;

3.对于已经创建但是还没有Segment的表来说,可以执行alter table XXX allocate extent来使其创建出    Segment,当然也可以插入一条数据,使其创建Segment

最终的解决方法:

先查询一下哪些表是空的:

select table_name from user_tables where NUM_ROWS=0;

下面我们通过select 来生成修改语句:

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

然后复制生成的修改语句执行,问题解决

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn