impdp system/oracle111 directory=EXPDP tables=b.b_file dumpfile=20160104expdpb_file.dmp TABLE_EXISTS_ACTION=APPEND logfile=20160104impdpb_file.log
【在远端直接导入】
expdp system/oracle directory=EXPDPBD dumpfile=rptest_1tablespace_20160520.dmp TABLESPACES=myts network_link='DBLINK_RP' logfile=rptest_1tablespace_20160520.log
源端:
RAN USERS
目标端
create tablespace mydemo datafile '/u01/app/oracle/oradata/ora11g/mydemo01.dbf' size 100M;
create user sender identified by oracle default tablespace mydemo;
grant connect,resource to sender;
需求:
将源端的ran用户下的表 导入到 本地的sender用户下。使用network_link参数
impdp system/oracle schemas=ran remap_schema=ran:sender remap_tablespace=users:mydemo,myts:mydemo network_link='DBLINK_RP' logfile=rptest_1tablespace_2016052001.log
[ora11g@instance ~]$ impdp system/oracle schemas=ran remap_schema=ran:sender remap_tablespace=users:mydemo,myts:mydemo network_link='DBLINK_RP' logfile=rptest_1tablespace_2016052001.log
Import: Release 11.2.0.4.0 - Production on Sat May 21 00:06:00 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_02": system/******** schemas=ran remap_schema=ran:sender remap_tablespace=users:mydemo,myts:mydemo network_link=DBLINK_RP logfile=rptest_1tablespace_2016052001.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"SENDER" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . imported "SENDER"."T2" 4 rows
. . imported "SENDER"."T3" 4 rows
. . imported "SENDER"."TEST" 4 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Job "SYSTEM"."SYS_IMPORT_SCHEMA_02" completed with 1 error(s) at Sat May 21 00:06:55 2016 elapsed 0 00:00:55