oracle12c ignore 参数,深入了解imp的ignore参数

这个实验得到的结论是:用imp导入数据使用ignore=y参数的话,如果表存在,那么会追加数据到表中。

如果不限制ignore参数的话,系统默认是ignore=n,当遇到已经存在的表导入数据时会提示对象已存在的错误。我们要根据实际的需求来决定是否使用这个参数,有些人为了让导入的过程不出现错误而使用这个参数,我认为没有必要,这个参数要谨慎使用,否则数据库中多了很多重复数据都不知道什么原因。

下面是实验的过程:

[oracle@S01 ~]$ sqlplus xzh/oracle

SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 17 01:52:05 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from t_char1;

C

-

a

b

c

SQL> ! exp xzh/oracle file=/home/oracle/tempdata/t_char1.dmp tables=t_char1

Export: Release 11.2.0.1.0 - Production on Fri Aug 17 01:54:17 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in US7ASCII character set and AL16UTF16 NCHAR character set

server uses ZHS16GBK character set (possible charset conversion)

About to export specified tables via Conventional Path ...

. . exporting table                        T_CHAR1          3 rows exported

EXP-00091: Exporting questionable statistics.

Export terminated successfully with warnings.

SQL> ! ls /home/oracle/tempdata/t_char1.dmp

/home/oracle/tempdata/t_char1.dmp

SQL> ! imp xzh/oracle file=/home/oracle/tempdata/t_char1.dmp ignore=y

Import: Release 11.2.0.1.0 - Production on Fri Aug 17 01:55:42 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path

import done in US7ASCII character set and AL16UTF16 NCHAR character set

import server uses ZHS16GBK character set (possible charset conversion)

. importing XZH's objects into XZH

. importing XZH's objects into XZH

. . importing table                      "T_CHAR1"          3 rows imported

Import terminated successfully without warnings.

SQL> select * from t_char1;

C

-

a

b

c

a

b

c

6 rows selected.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值