需求:从真实数据库orcl中将A00362用户下的A0003399_A_CHRONOLOGICAL表导到测试数据库orcl中的A00479用户下的A0000001_A_CHRONOLOGICAL表中
两张表结构完全一样
将表从真实数据库导出来:
expdp orcl/orcl@orcl schemas=A00362 DIRECTORY=demp dumpfile=d.dmp include=table:"in('A0003399_A_CHRONOLOGICAL')" CONTENT=DATA_ONLY
将表导进测试数据库:
impdp orcl/orcl@orcl DIRECTORY=demp dumpfile=d.dmp REMAP_SCHEMA=A00362:A00479 REMAP_TABLESPACE=A00362_DATA:A00479_DATA remap_TABLE=A0003399_A_CHRONOLOGICAL:A0000001_A_CHRONOLOGICAL content=data_only
想将两张表一起导出来提示:UDE-00010: 已请求多个作业模式, schema 和 tables。
C:\Users\Administrator>expdp orcl/orcl@orcl schemas=A00535 DIRECTORY=demp dumpfi
le=e.dmp tables=A0000002_A_CHRONOLOGICAL,A0000003_A_CHRONOLOGICAL,A0000002_A_BAL
ANCE_SS,A0000003_A_BALANCE_SS CONTENT=DATA_ONLY
Export: Release 11.2.0.1.0 - Production on 星期四 5月 11 14:56:24 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
UDE-00010: 已请求多个作业模式, schema 和 tables。
将schema和tables保留一个即可
C:\Users\Administrator>expdp orcl/orcl@orcl DIRECTORY=demp dumpfile=e.dmp table
s=A00535.A0000002_A_CHRONOLOGICAL,A00535.A0000002_A_BALANCE_SS CONTENT=DATA_ONLY
Export: Release 11.2.0.1.0 - Production on 星期四 5月 11 14:59:27 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "ORCL"."SYS_EXPORT_TABLE_01": orcl/********@orcl DIRECTORY=demp dumpfile=e
.dmp tables=A00535.A0000002_A_CHRONOLOGICAL,A00535.A0000002_A_BALANCE_SS CONTENT
=DATA_ONLY
正在使用 BLOCKS 方法进行估计...
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 3.187 MB
. . 导出了 "A00535"."A0000002_A_CHRONOLOGICAL" 2.280 MB 12311 行
. . 导出了 "A00535"."A0000002_A_BALANCE_SS" 138.5 KB 408 行
已成功加载/卸载了主表 "ORCL"."SYS_EXPORT_TABLE_01"