Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

11

积分

0

好友

14

主题
1#
发表于 2013-1-17 14:13:34 | 查看: 10535| 回复: 3
本帖最后由 wengtf 于 2013-1-17 14:17 编辑

env:oracle 11.2.0.1 on solaris 10 sparc 64bit

impdp/expdp 语句及参数:
expdp \'sys/passwd as sysdba\' schemas=xxx directory=DATA_PUMP_DIR dumpfile=expdp_xxx_structure_20130116.dmp logfile=expdp_xxx_structure_20130116.log content=metadata_only show=y

impdp\'sys/passwd as sysdba\' schemas=xxx directory=DATA_PUMP_DIR dumpfile=expdp_xxx_structure_20130116.dmp logfile=impdp_xxx_structure_20130117.log content=metadata_only show=y

describle: 从local database expdp 导出了仅结构,然后到 在target database  impdp的出现下面关键的几个报错:

ORA-39082 ,ORA-39083:package编译出错
ora-04052,ora-00604,ora-02019:此次impdp没有加network_link参数

  1. Import: Release 11.2.0.1.0 - Production on Wed Jan 16 15:09:40 2013Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
  2. ;;;
  3. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  4. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  5. Master table "SYS"."SYS_IMPORT_SCHEMA_02" successfully loaded/unloaded
  6. Starting "SYS"."SYS_IMPORT_SCHEMA_02":  "sys/******** AS SYSDBA" schemas=xxx directory=DATA_PUMP_DIR dumpfile=expdp_NAIAWII_stucture_20130116.dmp logfile=impdp_NAIAWII_stucture_20130116.log content=metadata_only
  7. Processing object type SCHEMA_EXPORT/USER
  8. Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
  9. Processing object type SCHEMA_EXPORT/ROLE_GRANT
  10. Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
  11. Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
  12. Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
  13. Processing object type SCHEMA_EXPORT/DB_LINK
  14. Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
  15. Processing object type SCHEMA_EXPORT/TABLE/TABLE
  16. Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
  17. 。。。。。
  18. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO200909017" created with compilation warnings
  19. ORA-39083: Object type PACKAGE_BODY failed to create with error:
  20. ORA-04052: error occurred when looking up remote object NGMC058.DCMS_MP@LK_CPDWH01
  21. ORA-00604: error occurred at recursive SQL level 3
  22. ORA-02019: connection description for remote database not found
  23. Failing sql is:
  24. ALTER PACKAGE "NAIAWII"."PKG_CHO201002009"   COMPILE BODY     PLSQL_OPTIMIZE_LEVEL=  2    PLSQL_CODE_TYPE=  INTERPRETED    PLSQL_DEBUG=  TRUE    PLSCOPE_SETTINGS=  'IDENTIFIERS:NONE' REUSE SETTINGS TIMESTAMP '2012-04-19 16:22:07'
  25. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO201002015" created with compilation warnings
  26. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO201003020" created with compilation warnings
  27. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO201008016" created with compilation warnings
  28. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO201108010" created with compilation warnings
  29. ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_TESTPER01" created with compilation warnings
  30. Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
  31. Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
  32. Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
  33. Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  34. Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
  35. Job "SYS"."SYS_IMPORT_SCHEMA_02" completed with 2445 error(s) at 15:23:58
复制代码
2#
发表于 2013-1-23 17:00:11
需要引起ml关注,顶一个,依然没有解决掉,今天做测试依然还是该问题

回复 只看该作者 道具 举报

3#
发表于 2013-1-23 21:57:37
ORA-39082: Object type PACKAGE_BODY:"NAIAWII"."PKG_CHO200909017" created with compilation warnings
ORA-39083: Object type PACKAGE_BODY failed to create with error:
ORA-04052: error occurred when looking up remote object NGMC058.DCMS_MP@LK_CPDWH01
ORA-00604: error occurred at recursive SQL level 3
ORA-02019: connection description for remote database not found
Failing sql is:
ALTER PACKAGE "NAIAWII"."PKG_CHO201002009"   COMPILE BODY     PLSQL_OPTIMIZE_LEVEL=  2    PLSQL_CODE_TYPE=  INTERPRETED    PLSQL_DEBUG=  TRUE    PLSCOPE_SETTINGS=  'IDENTIFIERS:NONE' REUSE SETTINGS TIMESTAMP '2012-04-19 16:22:07'


用 exclude 排除掉 PKG_CHO200909017 和 PKG_CHO201002009 这2个包体, 导入。

上面的这2个包体尝试 手动创建,

NGMC058.DCMS_MP@LK_CPDWH01 这个是包体涉及到的 远程对象吧, 和network_link没关系

回复 只看该作者 道具 举报

4#
发表于 2013-1-24 08:45:46
本帖最后由 wengtf 于 2013-1-24 10:15 编辑

嗯,目前是源库的dblink是一个类似”LK_CPDWH01.us.com.cn“,但是导入目标库后,dblink变成了”LK_CPDWH01“,目标库查出来的dblink create 语句也是”LK_CPDWH01.us.com.cn“,莫非还有映射?还是dblink也有同义词?
另:“用 exclude 排除掉 PKG_CHO200909017 和 PKG_CHO201002009 这2个包体, 导入”,赞同ml的建议 。
-------------------------------------------------------------------------------------------------------------------------
但还有个疑问,为什么其他导入的包或包体会编译出错呢,是否是11.2.0.1的bug?还是跟包本身的代码编写有关呢?
--------------------------------------------------------------------------------------------------------------------------
PS:目标库该schema的对象总数减掉没成功的2个包体,数量远少于源库,有疑问。----ml指点下。

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-16 07:00 , Processed in 0.045870 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569