由于需求,要求在测试库中构造一些数据,因此想到从生产库上导出相应表,再到测试库中导入,但操作过程过出现如下错误:
C:\Documents and Settings\Administrator>impdp ccense/ccense dumpfile=csexpdp.dmp directory=imp_dp content=DATA_ONLY include=table:\"in('base_customers,base_customers_info,base_customers_photo,base_custdept,base_emp,base_batnum,base_dept,b
ase_role,base_station,base_station_port,base_station_log,base_term,rec_acc_fare,
rec_bllt,rec_card_make,rec_loss')\"
Import: Release 11.1.0.6.0 - Production on 星期三, 25 12月, 2013 13:13:30
Copyright (c) 2003, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: 参数值无效
ORA-39000: 转储文件说明错误
ORA-39142: 版本号 3.1 (在转储文件 "d:\expdp\csexpdp.dmp" 中) 不兼容
经查询,发现生产库数据库版本是11.2.0.3,而测试库为11.1.0.6,导入时不兼容。
处理方法:expdp ccense/ccense directory=exp_dp dumpfile=newdmp.dmp tables=base_customers,base_customers_info,base_customers_photo,base_custdept,base_emp,base_batnum,base_dept,base_role,base_station,base_station_port,base_station_log,base_term,rec_acc_fare,rec_bllt,rec_card_make,rec_loss version=11.1.0.6.0
impdp ccense/123 dumpfile=newdmp.dmp directory=imp_dp content=DATA_ONLY
Import: Release 11.1.0.6.0 - Production on 星期三, 25 12月, 2013 13:41:36
Copyright (c) 2003, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已成功加载/卸载了主表 "CCENSE"."SYS_IMPORT_FULL_01"
启动 "CCENSE"."SYS_IMPORT_FULL_01": ccense/******** dumpfile=newdmp.dmp directo
ry=imp_dp content=DATA_ONLY
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
. . 导入了 "CCENSE"."BASE_CUSTOMERS" 17.93 MB 60383 行
. . 导入了 "CCENSE"."REC_CARD_MAKE" 10.82 MB 103651 行
. . 导入了 "CCENSE"."BASE_CUSTOMERS_INFO" 9.224 MB 68258 行
. . 导入了 "CCENSE"."REC_LOSS" 2.630 MB 42203 行
. . 导入了 "CCENSE"."REC_BLLT" 1.033 MB 23978 行
. . 导入了 "CCENSE"."REC_ACC_FARE" 677.3 KB 4308 行
. . 导入了 "CCENSE"."BASE_CUSTDEPT" 338.6 KB 4473 行