暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle IMPDP通过网络链路ORA-3916架构XXXXX未找到错误

askTom 2017-02-24
412

问题描述

你好。
我正在尝试通过网络链接在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

请注意,即使您在创建表时使用了小写字母,除非您将名称放在双引号中,否则它将以大写形式存储在数据字典中:

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进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论