---
title: "oracle 覆盖导入数据(转)"
author: "foolraty"
date: "2010-07-30T11:11:48Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2010-07-30T11:11:48Z"
id: 725155
url: "https://foolraty.iteye.com/blog/725155"
---

覆盖的话，增加一个参数ignore=y就可以 

D:\Documents   and   Settings\liusn> sqlplus   /nolog 

SQL*Plus:   Release   9.2.0.1.0   -   Production   on   星期二   10月   31   17:52:27   2006 

Copyright   (c)   1982,   2002,   Oracle   Corporation.     All   rights   reserved. 

idle> conn   demo/demo 
已连接。 
idle> create   table   testimp   (id   number); 

表已创建。 

idle> insert   into   testimp   values(1); 

已创建   1   行。 

idle> insert   into   testimp   values(2); 

已创建   1   行。 

idle> commit   ; 

提交完成。 

idle> exit 
从Oracle9i   Enterprise   Edition   Release   9.2.0.1.0   -   Production 
With   the   Partitioning,   OLAP   and   Oracle   Data   Mining   options 
JServer   Release   9.2.0.1.0   -   Production中断开 

D:\Documents   and   Settings\liusn> cd\ 

D:\> exp   demo/demo@xiaoxiao   file   =   'd:\20061031.dmp '   tables   =   (testimp) 

Export:   Release   9.2.0.1.0   -   Production   on   星期二   10月   31   17:54:03   2006 

Copyright   (c)   1982,   2002,   Oracle   Corporation.     All   rights   reserved. 


连接到:   Oracle9i   Enterprise   Edition   Release   9.2.0.1.0   -   Production 
With   the   Partitioning,   OLAP   and   Oracle   Data   Mining   options 
JServer   Release   9.2.0.1.0   -   Production 
已导出   ZHS16GBK   字符集和   AL16UTF16   NCHAR   字符集 

即将导出指定的表通过常规路径   ... 
.   .   正在导出表                                                   TESTIMP                     2   行被导出 
在没有警告的情况下成功终止导出。 

D:\> sqlplus   /nolog 

SQL*Plus:   Release   9.2.0.1.0   -   Production   on   星期二   10月   31   17:54:13   2006 

Copyright   (c)   1982,   2002,   Oracle   Corporation.     All   rights   reserved. 

idle> conn   demo/demo 
已连接。 
idle> truncate   table   testimp 
    2     / 

表已截掉。 

idle> insert   into   testimp   values(3); 

已创建   1   行。 

idle> insert   into   testimp   values(4); 

已创建   1   行。 

idle> commit   ; 

提交完成。 

idle> exit 
从Oracle9i   Enterprise   Edition   Release   9.2.0.1.0   -   Production 
With   the   Partitioning,   OLAP   and   Oracle   Data   Mining   options 
JServer   Release   9.2.0.1.0   -   Production中断开 

D:\> imp   demo/demo@xiaoxiao   file   =   d:\20061031.dmp   fromuser=demo   touser=demo   tabl 
es=(testimp)   ignore=y 

Import:   Release   9.2.0.1.0   -   Production   on   星期二   10月   31   17:55:28   2006 

Copyright   (c)   1982,   2002,   Oracle   Corporation.     All   rights   reserved. 


连接到:   Oracle9i   Enterprise   Edition   Release   9.2.0.1.0   -   Production 
With   the   Partitioning,   OLAP   and   Oracle   Data   Mining   options 
JServer   Release   9.2.0.1.0   -   Production 

经由常规路径导出由EXPORT:V09.02.00创建的文件 
已经完成ZHS16GBK字符集和AL16UTF16   NCHAR   字符集中的导入 
.   .   正在导入表                                               "TESTIMP "                     2行被导入 
成功终止导入，但出现警告。 

D:\> sqlplus   /nolog 

SQL*Plus:   Release   9.2.0.1.0   -   Production   on   星期二   10月   31   17:55:33   2006 

Copyright   (c)   1982,   2002,   Oracle   Corporation.     All   rights   reserved. 

idle> conn   demo/demo 
已连接。 
idle> select   *   from   testimp; 

                ID 
---------- 
                  3 
                  4 
                  1 
                  2