Exp 命令怎样导出某个表的某个分区的数据

解决方案 »

  1.   

    可以用select选项来选择你所需要的分区的表名字
      

  2.   

    SQL> create table wf(x int)
      2  partition by range(x)(
      3  partition p1_10 values less than (10),
      4  partition p2_20 values less than(maxvalue));表已创建。
    SQL> edit
    已写入 file afiedt.buf  1  begin
      2  for i in 1..20 loop
      3  insert into wf values(i);
      4  end loop;
      5* end;
    SQL> /PL/SQL 过程已成功完成。SQL> select * from wf;         X
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
            11
            12
            13
            14
            15
            16
            17
            18
            19
            20已选择20行。
    SQL> select * from wf partition(p1_10);         X
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9已选择9行。SQL> commit;提交完成。C:\Documents and Settings\Administrator>exp wf/oracle tables=wf:p1_10Export: Release 11.1.0.6.0 - Production on 星期三 12月 17 22:02:53 2008Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径...
    . . 正在导出表                              WF
    . . 正在导出分区                           P1_10导出了           9 行
    EXP-00091: 正在导出有问题的统计信息。
    导出成功终止, 但出现警告。
      

  3.   

    imp wf/oracle ignore=y tables=wf:p1_10