oracle分区表备份,只还原1个分区
2016-06-06oracle分区表备份,只还原1个分区,使用statistics=none,也就是不导出统计信息。
alter table ANONYMOUSUSER_ALL truncate partition ANONY_ALL_2011_05 update indexes;
imp part/part file=ANONYMOUSUSER_ALL-ANONY_ALL_2011_05.dmp tables=ANONYMOUSUSER_ALL:ANONY_ALL_2011_05 ignore=y
备份多个分区:
exp part/part file=ANONY_ALL_2011_07-ANONY_ALL_2011_08.dmp tables=ANONYMOUSUSER_ALL:ANONY_ALL_2011_07,ANONYMOUSUSER_ALL:ANONY_ALL_2011_08 statistics=none
创建分区表:
create table 1
{}
导入多个分区:
imp part/part file=ANONY_ALL_2011_07-ANONY_ALL_2011_08.dmp tables=ANONYMOUSUSER_ALL:ANONY_ALL_2011_07,ANONYMOUSUSER_ALL:ANONY_ALL_2011_08 ignore=y
imp talk99_crm/comeontalk99 file=/opt/crm_contact_2016-05-30-05.dmp tables=CRM_CONTACT:PT_10029768 ignore=y buffer=102400000
select count(*) from crm_contact partition(PT_10029768) where CREATOR='btqjljguodan';
IMP-00032: SQL statement exceeded buffer length
解决办法:
SQL语句超过缓冲区长度,需要加大buffer,可以指定buffer的大小.