impdp 10g/11g问题解决

简介: 今天在环境上测试expdp/impdp,环境有10.2.0.5.0,11.2.0.2.0的,11g的环境是从10g升级到11gde .是在impdp的时候都报了错误。

今天在环境上测试expdp/impdp,环境有10.2.0.5.0,11.2.0.2.0的,11g的环境是从10g升级到11gde .是在impdp的时候都报了错误。

10g报错如下:

> impdp test/test dumpfile=a.dmp directory=true_dump tables=test_table

Import: Release 10.2.0.5.0 - 64bit Production on Tuesday, 29 October, 2013 17:24:12

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31655: no data or metadata objects selected for job
Master table "TEST"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_TABLE_01":  test/********@xxxxx
dumpfile=a.dmp directory=a_dump tables=test_table
Job "TEST"."SYS_IMPORT_TABLE_01" successfully completed at 17:24:15

11g报错如下:

> impdp temp_usg/temp_usg directory=expdp_dir dumpfile=a.dmp tables=tet_table

Import: Release 11.2.0.2.0 - Production on Tue Oct 29 19:47:17 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39166: Object TEMP_USG.TEST_TABLE was not found.

最后尝试使用remap_schema 和tables选项,还是报错。

10g报错:

> impdp test/test dumpfile=a.dmp directory=a_dump remap_schema=trudbo24:test tables=test_table

Import: Release 10.2.0.5.0 - 64bit Production on Tuesday, 29 October, 2013 18:03:40

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31655: no data or metadata objects selected for job
Master table "TEST"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_TABLE_01":  test/********@truabp1 dumpfile=a.dmp directory=true_dump remap_schema=trudbo24:test tables=csm_offer
Job "TEST"."SYS_IMPORT_TABLE_01" successfully completed at 18:03:43

11g报错:

Import: Release 11.2.0.2.0 - Production on Tue Oct 29 19:49:32 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39166: Object TEMP_USG.TEST_TABLE  was not found.

最后在tables的地方加上schema名称,可以顺利导入了。
impdp test/test  dumpfile=a.dmp directory=a_dump remap_schema=testo24:test tables=testo24.test_table

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "TEST"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_TABLE_01":  test/********

dumpfile=a.dmp directory=a_dump remap_schema=testo24:test tables=testo24.test_table

Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "TEST"."TEST_TABLE"                          1.622 MB    1939 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "TEST"."SYS_IMPORT_TABLE_01" successfully completed at 18:04:33

查找metalink,也有一个类似的bug,看来只能这样先用了。

相关实践学习
数据库实验室挑战任务-初级任务
本场景介绍如何开通属于你的免费云数据库,在RDS-MySQL中完成对学生成绩的详情查询,执行指定类型SQL。
阿里云云原生数据仓库AnalyticDB MySQL版 使用教程
云原生数据仓库AnalyticDB MySQL版是一种支持高并发低延时查询的新一代云原生数据仓库,高度兼容MySQL协议以及SQL:92、SQL:99、SQL:2003标准,可以对海量数据进行即时的多维分析透视和业务探索,快速构建企业云上数据仓库。 了解产品 https://www.aliyun.com/product/ApsaraDB/ads
目录
相关文章
|
Oracle 关系型数据库 数据库
|
Oracle 关系型数据库 OLAP
|
Oracle 关系型数据库 数据库
IMPDP
在10g之前,传统的导出和导入分别使用EXP工具和IMP工具,从10g开始,不仅保留了原有的EXP和IMP工具,还提供了数据泵导出导入工具EXPDP和IMPDP.使用EXPDP和IMPDP时应该注意的事项: 1、EXP和IMP是客户端工具程序,它们既可以在可以客户端使用,也可以在服务端使用。
1698 0
|
关系型数据库 数据库 数据安全/隐私保护
EXPDP
OracleDatabase 10g引入了最新的数据泵(DataDump)技术,数据泵导出导入(EXPDP和IMPDP)的作用 1、实现逻辑备份和逻辑恢复. 2、在数据库用户之间移动对象. 3、在数据库之间移动对象 4、实现表空间搬移.
1329 0
|
数据库 关系型数据库 Oracle
|
Oracle 关系型数据库 OLAP
|
存储 SQL 数据库
|
数据安全/隐私保护
|
SQL Oracle 关系型数据库