入作业会跳过已存在表处理下一个对象;当设置为APPEND时,会追加数据,为TRUNCATE时,导入作业会截断表,然后为其追加新数据;当设置为REPLACE时,导入作业会删除已存在表,重建表病追加数据,注意,TRUNCATE选项不适用与簇表和NETWORK_LINK选项
9、TRANSFORM
该选项用于指定是否修改建立对象的DDL语句
TRANSFORM=transform_name:value[:object_type]
Transform_name用于指定转换名,其中SEGMENT_ATTRIBUTES用于标识段属性(物理属性,存储属性,表空间,日志等信息),STORAGE用于标识段存储属性,VALUE用于指定是否包含段属性或段存储属性,object_type用于指定对象类型.
Impdp scott/tiger directory=dump dumpfile=tab.dmp Transform=segment_attributes:n:table
10、TRANSPORT_DATAFILES
该选项用于指定搬移空间时要被导入到目标数据库的数据文件
TRANSPORT_DATAFILE=datafile_name
Datafile_name用于指定被复制到目标数据库的数据文件
Impdp system/manager DIRECTORY=dump DUMPFILE=tts.dmp
TRANSPORT_DATAFILES=’/user01/data/tbs1.f’调用IMPDP
table_exists_action=replace:表如果存在,则替换
1、按表导入
HR_20141027.dmp文件中的表,此文件是以hr用户按schemas=hr导出的:
impdp hr_exp/hr_exp@192.168.11.1:1521/orcl dumpfile =HR_20141027.dmp logfile=hr_20141027.log directory=DIR_EXP remap_schema=hr:hr_exp exclude=statistics tables=hr.jobs job_name=my_job table_exists_action=replace
C:\Users\Administrator>impdp hr_exp/hr_exp@192.168.11.1:1521/orcl dumpfile =HR_2
0141027.dmp logfile=hr_20141027.log directory=DIR_EXP remap_schema=hr:hr_exp
exclude=statistics tables=hr.jobs job_name=my_job table_exists_action=replace
Import: Release 10.2.0.1.0 - Production on 星期一, 27 10月, 2014 21:32:01
Copyright (c) 2003, 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
已成功加载/卸载了主表 "HR_EXP"."MY_JOB"
启动 "HR_EXP"."MY_JOB": hr_exp/********@192.168.11.1:1521/orcl dumpfile =HR_201
41027.dmp logfile=hr_20141027.log directory=DIR_EXP remap_schema=hr:hr_exp exclu
de=statistics tables=hr.jobs job_name=my_job table_exists_action=replace
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
. . 导入了 "HR_EXP"."JOBS" 6.609 KB 19 行
处理对象类型 SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/INDEX
处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
处理对象类型 SCHEMA_EXPORT/TABLE/COMMENT
作业 "HR_EXP"."MY_JOB" 已于 21:32:06 成功完成
2、按用户导入(可以将用户信息直接导入,即如果用户信息不存在的情况下也可以直接导入)
impdp hr_exp/hr_exp@192.168.11.1:1521/orcl schemas=hr dumpfile =HR_20141027.dmp logfile=hr_20141027.log directory=DIR_EXP job_name=my_job
C:\Users\Administrator>impdp hr_exp/hr_exp@192.168.11.1:1521/orcl schemas=hr du
mpfile =HR_20141027.dmp logfile=hr_20141027.log directory=DIR_EXP job_name=my_jo
b
Import: Release 10.2.0.1.0 - Production on 星期一, 27 10月, 2014 21:33:29
Copyright (c) 2003, 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
已成功加载/卸载了主表 "HR_EXP"."MY_JOB"
启动 "HR_EXP"."MY_JOB": hr_exp/********@192.168.11.1:1521/orcl schemas=hr dumpf
ile =HR_20141027.dmp logfile=hr_20141027.log directory=DIR_EXP job_name=my_job
处理对象类型 SCHEMA_EXPORT/USER
处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
处理对象类型 SCHEMA_EXPORT/SEQUENCE/SEQUENCE
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
. . 导入了 "HR"."COUNTRIES" 5.992 KB 25 行
. . 导入了 "HR"."DEPARTMENTS" 6.632 KB 27 行
. . 导入了 "HR"."EMPLOYEES" 15.76 KB 107