怎样把一个dmp导入到oracle 数据库中,数据库中原来也有数据,可能新导入的数据中也有这一条,
这条新的数据就不导入这一条,这个怎么写呀?是 oracle92的数据库

解决方案 »

  1.   

    相关表上有没有什么唯一性约束。 如果有可以尝试在imp 时加ingore=y 看看..
    ------------------------------------------------------------------------------ 
    Blog: http://blog.csdn.net/tianlesoftware 
    网上资源: http://tianlesoftware.download.csdn.net 
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx 
    Q Q 群:62697716
      

  2.   

    如果违反表上约束,是无法导入的。如果没有,忽略创建错误.IGNORE   忽略创建错误 (N)设为IGNORE=Y
      

  3.   

    我记得如果有同名的表,在imp的时候不管是不是相同的记录,都是不会向该表中插入任何数据的。
      

  4.   

    SQL> show user
    USER 为 "SYS"
    SQL> create table scott.area as select * from eht.area where rownum<=10;表已创建。SQL> select * from scott.area where rownum<=2;    AREAID AREACO AREANAME                         A PARENTAREAID S
    ---------- ------ -------------------------------- - ------------ -
             1 33     浙江省                           1           -1 1
             2 3301   杭州市                           2            1 1SQL> select count(*) from scott.area
      2  ;  COUNT(*)
    ----------
            10SQL> host exp eht/eht@test file=d:\test.dmp tables=area;Export: Release 10.2.0.1.0 - Production on 星期五 3月 5 14:37:46 2010Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集即将导出指定的表通过常规路径...
    . . 正在导出表                            AREA导出了         106 行
    成功终止导出, 没有出现警告。SQL> host imp scott/scott@test file=d:\test.dmp fromuser=eht touser=scott IGNORE
    =yImport: Release 10.2.0.1.0 - Production on 星期五 3月 5 14:38:01 2010Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options经由常规路径由 EXPORT:V10.02.01 创建的导出文件警告: 这些对象由 EHT 导出, 而不是当前用户已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
    . 正在将 EHT 的对象导入到 SCOTT
    . . 正在导入表                          "AREA"导入了         106 行
    成功终止导入, 没有出现警告。SQL> select count(*) from scott.area;  COUNT(*)
    ----------
           116SQL>