问题描述
你好。
我正在尝试通过网络链接在2个实例之间迁移数据库对象。
源数据库为11.2.0.3版本
目标数据库是12.1.0.2版本
在两个系统上都存在一个名为TAGDATI的架构,其DATAPUMP_EXP_FULL_DATABASE和DATAPUMP_IMP_FULL_DATABASE角色被授予
一切都很好,直到我尝试传输单个对象 (例如: 表)
但是,当我尝试使用INCLUDE参数 (带或不带参数文件) 时,作业失败并显示错误:
如前所述,该模式存在于两个数据库上,并具有正确的授权 (或者我认为是这样)
这是我的参数文件:
以下是我如何运行impdp:
有什么想法吗?
我正在尝试通过网络链接在2个实例之间迁移数据库对象。
源数据库为11.2.0.3版本
目标数据库是12.1.0.2版本
在两个系统上都存在一个名为TAGDATI的架构,其DATAPUMP_EXP_FULL_DATABASE和DATAPUMP_IMP_FULL_DATABASE角色被授予
一切都很好,直到我尝试传输单个对象 (例如: 表)
impdp TAGDATI/hiddenpassword directory=dpdump network_link=link_tagdati tables=tagdati.export_tagdati logfile=impdp.log remap_schema=tagdati:tagdati复制
但是,当我尝试使用INCLUDE参数 (带或不带参数文件) 时,作业失败并显示错误:
ORA-39165: Schema TAGDATI was not found. ORA-39097: Data Pump job encountered unexpected error -904 ORA-39065: unexpected master process exception in DISPATCH ORA-00904: "TAG": invalid identifier复制
如前所述,该模式存在于两个数据库上,并具有正确的授权 (或者我认为是这样)
这是我的参数文件:
NETWORK_LINK=LINK_TAGDATI SCHEMAS=TAGDATI INCLUDE=TABLE:"IN('export_tagdati')" REMAP_SCHEMA=TAGDATI:TAGDATI复制
以下是我如何运行impdp:
impdp tagdati/hiddenpassword directory=dpdump PARFILE=./test.par logfile=impdp.log复制
有什么想法吗?
专家解答
include和exclude子句中的对象名称区分大小写:
The name that you supply for the name_clause must exactly match, including upper and lower casing, an existing object in the database. For example, if the name_clause you supply is for a table named EMPLOYEES, then there must be an existing table named EMPLOYEES using all upper case. If the name_clause were supplied as Employees or employees or any other variation, then the table would not be found.
http://docs.oracle.com/database/122/SUTIL/oracle-data-pump-export-utility.htm#SUTIL853
请注意,即使您在创建表时使用了小写字母,除非您将名称放在双引号中,否则它将以大写形式存储在数据字典中:
The name that you supply for the name_clause must exactly match, including upper and lower casing, an existing object in the database. For example, if the name_clause you supply is for a table named EMPLOYEES, then there must be an existing table named EMPLOYEES using all upper case. If the name_clause were supplied as Employees or employees or any other variation, then the table would not be found.
http://docs.oracle.com/database/122/SUTIL/oracle-data-pump-export-utility.htm#SUTIL853
请注意,即使您在创建表时使用了小写字母,除非您将名称放在双引号中,否则它将以大写形式存储在数据字典中:
SQL> create table t as 2 select * from all_objects; Table created. SQL> SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options C:\windows\system32> C:\windows\system32>expdp chris/xxxxx@db12c include=TABLE:"IN('t')" schemas=chris directory=tmp dumpfile=exp.dmp Export: Release 12.1.0.2.0 - Production on Fri Feb 24 11:29:01 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "CHRIS"."SYS_EXPORT_SCHEMA_01": chris/********@db12c include=TABLE:IN('t') schemas=chris directory=tmp dumpfile=exp.dmp Estimate in progress using BLOCKS method... Total estimation using BLOCKS method: 0 KB ORA-39165: Schema CHRIS was not found. ORA-39168: Object path TABLE was not found. ORA-31655: no data or metadata objects selected for job Job "CHRIS"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at Fri Feb 24 03:29:10 2017 elapsed 0 00:00:06 C:\windows\system32>expdp chris/xxxxx@db12c include=TABLE:"IN('T')" schemas=chris directory=tmp dumpfile=exp.dmp Export: Release 12.1.0.2.0 - Production on Fri Feb 24 11:29:11 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "CHRIS"."SYS_EXPORT_SCHEMA_01": chris/********@db12c include=TABLE:IN('T') schemas=chris directory=tmp dumpfile=exp.dmp Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 12 MB Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS . . exported "CHRIS"."T" 9.600 MB 90407 rows Master table "CHRIS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for CHRIS.SYS_EXPORT_SCHEMA_01 is: /tmp/exp.dmp Job "CHRIS"."SYS_EXPORT_SCHEMA_01" successfully completed at Fri Feb 24 03:29:25 2017 elapsed 0 00:00:11复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle DataGuard高可用性解决方案详解
孙莹
507次阅读
2025-03-26 23:27:33
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
487次阅读
2025-04-15 17:24:06
墨天轮个人数说知识点合集
JiekeXu
406次阅读
2025-04-01 15:56:03
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
399次阅读
2025-04-08 09:12:48
Oracle SQL 执行计划分析与优化指南
Digital Observer
378次阅读
2025-04-01 11:08:44
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
368次阅读
2025-04-18 14:18:38
Oracle 19c RAC更换IP实战,运维必看!
szrsu
345次阅读
2025-04-08 23:57:08
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
316次阅读
2025-04-15 14:48:05
oracle定时任务常用攻略
virvle
316次阅读
2025-03-25 16:05:19
风口浪尖!诚通证券扩容采购Oracle 793万...
Roger的数据库专栏
312次阅读
2025-03-24 09:42:53