exp空表处理

exp aa/aa@orcl file=D:\.....
导出空表数据
1.select 'alter table '||table_name||' allocate extent;' from user_tables where SEGMENT_CREATED='NO';查出空表
然后往空表里面插入数据,导出后在删除

2.配置环境
alter system set deferred_segment_creation=false scope=both;
这个只能导出配置后的空表,也就是配置前的空表是导不出来的!

3.select 'alter table '||table_name||' allocate extent;' from user_tables where SEGMENT_CREATED='NO';查出空表 为空表分配空间
查询出空表然后执行查询的结果

然后在exp aa/aa@orcl file=D:\AA.DMP就可以一起导出空表

imp aa/aa file=d:\... 导入数据
exp 导出的数据可以导入到  不同表空间的不同用户中

猜你喜欢

转载自hu929236906.iteye.com/blog/2347409