--创建测试表 create table t_table as select * from dba_tables; --导出测试表 expdp TEST/******* directory=EXPDATA dumpfile=impdp_query_test.dmp logfile=impdp_query_test.log tables=TEST.t_table Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning,OLAP,Data Mining and Real Application Testing options Starting "TEST"."SYS_EXPORT_TABLE_01": TEST/******** directory=EXPDATA dumpfile=impdp_query_test.dmp logfile=impdp_query_test.log tables=TEST.t_table Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 576 KB Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "TEST"."T_TABLE" 449.2 KB 1727 rows Master table "TEST"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for TEST.SYS_EXPORT_TABLE_01 is: /arch/expdp/impdp_query_test.dmp Job "TEST"."SYS_EXPORT_TABLE_01" successfully completed at 16:36:20 --根据条件导入测试表,remap_schema 加 query 条件 生效 vi impdp_query_test2.par userid=TEST/****** DIRECTORY=EXPDATA DUMPFILE=impdp_query_test.dmp remap_schema=TEST:TEST2 CONTENT=all LOGFILE=result_test.log TABLES= TEST.t_table query=(TEST.t_table:"where owner ='TEST'") impdp parfile=impdp_query_test2.par Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning,Data Mining and Real Application Testing options Master table "TEST"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "TEST"."SYS_IMPORT_TABLE_01": TEST/******** parfile=impdp_query_test2.par Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "TEST2"."T_TABLE" 449.2 KB 6 out of 1727 rows Job "TEST"."SYS_IMPORT_TABLE_01" successfully completed at 16:38:01 --添加remap_table修改表名条件,query条件不生效 vi impdp_query_test2.par userid=TEST/****** DIRECTORY=EXPDATA DUMPFILE=impdp_query_test.dmp remap_schema=TEST:TEST2 remap_table=t_table:t_table1 CONTENT=all LOGFILE=result_test.log TABLES= TEST.t_table query=(TEST.t_table:"where owner ='TEST'") impdp parfile=impdp_query_test2.par Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning,Data Mining and Real Application Testing options Master table "TEST"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "TEST"."SYS_IMPORT_TABLE_01": TEST/******** parfile=impdp_query_test2.par Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "TEST2"."T_TABLE1" 449.2 KB 1727 rows Job "TEST"."SYS_IMPORT_TABLE_01" successfully completed at 16:42:29
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。