impdp include=table_data与content=data_only的区别

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:213

在使用数据泵导入时,为了加快导入速度先是将表上索引禁用:

alter index SYS_C0061367 unusable;
alter table my_test disable constraint SYS_C0061367;
alter index idx_mt_y unusable;

然后使用数据泵导入:

impdp \'/ as sysdba\' directory=foss_dump dumpfile=my_test01.dmp tables=iawr.my_test include=table_data table_exists_action=truncate
impdp \'/ as sysdba\' directory=foss_dump dumpfile=my_test01.dmp tables=iawr.my_test content=data_only table_exists_action=truncate

最后并行重建索引:

alter index idx_mt_y rebuild online compute statistics parallel 4;
alter index idx_mt_y noparallel;

alter table my_test enable constraint SYS_C0061367;
alter index SYS_C0061367 rebuild online compute statistics parallel 4;
alter index SYS_C0061367 noparallel;

今天在操作期间,发现使用content=data_only时,索引最后都自动被重建
而使用include=data_only时,索引一直处于unusable状态,这样看这两个
选项还是有些区别的。

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】