impdp 按条件导入测试 query

--创建测试表 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

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...