子敬正在创造自己的人生
需求有轻重缓急,功能有可控不可控。 需求有版本有截止(否则会无休无止),功能不可控变为可控。 集中兵力消灭敌人有生力量,集中优势兵力消灭敌人有生力量。

前天在业务库中导出完整库时,再导入到新库时发现部分表丢失。

看日志后分析是部分空表没有导出。查google知,11G中新特性,当表无数据时,不分配segment,以节省空间。而使用exp命令时,无Segment的表不会被导出。

那么处理方案是为空表分配segment

如何分配segment:

先执行如下语句得出空表,同时生成如何分配segment的sql:

 

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

 


查询到的结果如下:

 

然后将执行结果复制到另一个SQL窗口,并执行,分配segment.然后可以执行imp

    alter table QRTZ_CRON_TRIGGERS allocate extent;
    alter table QRTZ_JOB_LISTENERS allocate extent;
    alter table QRTZ_PAUSED_TRIGGER_GRPS allocate extent;
    alter table QRTZ_TRIGGER_LISTENERS allocate extent;
    alter table UNIT_COMMON_DEPARTMENT allocate extent;
    alter table UNIT_COMMON_USER allocate extent;
    alter table UNIT_DEPARTMENT_USER allocate extent;
    alter table MT_NOTICE allocate extent;
    alter table MT_TENANT_GZ_USER allocate extent;
    alter table MSG_SHORT_MESSAGE allocate extent;
    alter table MSG_MAS_CONFIG allocate extent;
    alter table CD_READ_MARKER allocate extent;
    alter table EXCHANGE_LOG allocate extent;
    alter table QRTZ_BLOB_TRIGGERS allocate extent;
    alter table QRTZ_CALENDARS allocate extent;
    alter table MT_NOTICE_CONTENT_INFO allocate extent;
    alter table WF_GZ_DATA_SYNC allocate extent;
    alter table WF_GZ_DATA_SYNC_HIS allocate extent;
posted on 2016-05-12 08:52  silentjesse  阅读(601)  评论(0编辑  收藏  举报