ORACLE 11G数据库迁移到9I报 IMP-00003 ORA-00096 IMP-00000

本文涉及的产品
云原生数据仓库AnalyticDB MySQL版,基础版 8ACU 100GB 1个月
简介:

      今天有个朋友问我为什么11G的exp出来的文件不能导入到9I中?由于exp/imp工具的不兼容性,把高版本的数据库导到低版本时,需要使用低版本的exp/imp工具来导入导出。朋友用9i的exp去导出11G数据后再imp导入到9i中,正常导入,然而我自己在自己测试环境测试中切报错了,报错信息如下:

 
  1. [oracle9i@rhel4 admin]$ exp scott/oracle@orcl11g file='/tmp/scott_test_exp.sql' tables='test_exp' rows=N; 
  2.  
  3. Export: Release 9.2.0.4.0 - Production on Fri Mar 22 06:18:38 2013 
  4.  
  5. Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 
  6.  
  7.  
  8. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  9. With the Partitioning, OLAP, Data Mining and Real Application Testing options 
  10. Export done in US7ASCII character set and AL16UTF16 NCHAR character set 
  11. server uses ZHS16GBK character set (possible charset conversion) 
  12. Note: table data (rows) will not be exported 
  13.  
  14. About to export specified tables via Conventional Path ... 
  15. . . exporting table                       TEST_EXP 
  16. Export terminated successfully without warnings. 
  17.  
  18. [oracle9i@rhel4 admin]$ imp scott/oracle file='/tmp/scott_test_exp.dmp' tables='test_exp' 
  19.  
  20. Import: Release 9.2.0.4.0 - Production on Fri Mar 22 07:08:59 2013 
  21.  
  22. Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 
  23.  
  24.  
  25. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production 
  26. With the Partitioning, OLAP and Oracle Data Mining options 
  27. JServer Release 9.2.0.4.0 - Production 
  28.  
  29. Export file created by EXPORT:V09.02.00 via conventional path 
  30. import done in US7ASCII character set and AL16UTF16 NCHAR character set 
  31. import server uses ZHS16GBK character set (possible charset conversion) 
  32. IMP-00003: ORACLE error 96 encountered 
  33. ORA-00096: invalid value  for parameter plsql_compiler_flags, must be from among NON_DEBUG, DEBUG, INTERPRETED, NATIVE 
  34. IMP-00000: Import terminated unsuccessfully 

在11G,SHOW PARAMETER命令已经找不到plsql_compiler_flags这个参数,由另一个参数代替。

GOOGLE,BAIDU,METALINK相关的错误代码后没有找到解决方法。更改关键字plsql_compiler_flags在metalink找到解决方法,如下:

 
  1. [oracle11g@rhel4 admin]$ sqlplus / as sysdba 
  2.  
  3. SQL*Plus: Release 11.2.0.3.0 Production on Fri Mar 22 07:27:50 2013 
  4.  
  5. Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
  6.  
  7.  
  8. Connected to
  9. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  10. With the Partitioning, OLAP, Data Mining and Real Application Testing options 
  11.  
  12. SQL> CREATE OR REPLACE VIEW exu9defpswitches ( 
  13.   2                  compflgs, nlslensem ) AS 
  14.   3          SELECT  a.value, b.value 
  15.   4          FROM    sys.v$parameter a, sys.v$parameter b 
  16.   5          WHERE   a.name = 'plsql_code_type' AND 
  17.   6                  b.name = 'nls_length_semantics'  
  18.   7  ; 
  19.  
  20. View created. 

再次导出导入正常

 
  1. [oracle9i@rhel4 admin]$ exp scott/ORACLE@orcl11g file='/tmp/scott_test_exp.dmp' tables='test_exp'
  2.  
  3. Export: Release 9.2.0.4.0 - Production on Fri Mar 22 07:25:43 2013 
  4.  
  5. Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 
  6.  
  7.  
  8. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  9. With the Partitioning, OLAP, Data Mining and Real Application Testing options 
  10. Export done in US7ASCII character set and AL16UTF16 NCHAR character set 
  11. server uses ZHS16GBK character set (possible charset conversion) 
  12.  
  13. About to export specified tables via Conventional Path ... 
  14. . . exporting table                       TEST_EXP      74622 rows exported 
  15. Export terminated successfully without warnings. 
  16. [oracle9i@rhel4 admin]$ imp scott/oracle file='/tmp/scott_test_exp.dmp' tables='test_exp' 
  17.  
  18. Import: Release 9.2.0.4.0 - Production on Fri Mar 22 07:25:51 2013 
  19.  
  20. Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved. 
  21.  
  22.  
  23. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production 
  24. With the Partitioning, OLAP and Oracle Data Mining options 
  25. JServer Release 9.2.0.4.0 - Production 
  26.  
  27. Export file created by EXPORT:V09.02.00 via conventional path 
  28. import done in US7ASCII character set and AL16UTF16 NCHAR character set 
  29. import server uses ZHS16GBK character set (possible charset conversion) 
  30. . importing SCOTT's objects into SCOTT 
  31. . . importing table                     "TEST_EXP"      74622 rows imported 
  32. Import terminated successfully without warnings. 

11G中改回原来的视图定义

 
  1. [oracle11g@rhel4 sql]$ sqlplus / as sysdba 
  2.  
  3. SQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 25 02:15:51 2013 
  4.  
  5. Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
  6.  
  7.  
  8. Connected to
  9. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  10. With the Partitioning, OLAP, Data Mining and Real Application Testing options 
  11.  
  12. SQL> CREATE OR REPLACE VIEW exu9defpswitches ( 
  13.   2                  compflgs, nlslensem ) AS 
  14.   3          SELECT  a.value, b.value 
  15.   4          FROM    sys.v$parameter a, sys.v$parameter b 
  16.   5          WHERE   a.name = 'plsql_compiler_flags' AND 
  17.   6                  b.name = 'nls_length_semantics'  
  18.   7  ; 
  19.  
  20. View created. 
  21.  
  22. SQL> exit 
  23. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  24. With the Partitioning, OLAP, Data Mining and Real Application Testing options 

参考文档:

Export From 11g using EXP Utility Version 9iR2 Produces Corrupt Export Dump [ID 550740.1]



     本文转自7343696 51CTO博客,原文链接:http://blog.51cto.com/luoping/1161921,如需转载请自行联系原作者



相关实践学习
AnalyticDB MySQL海量数据秒级分析体验
快速上手AnalyticDB MySQL,玩转SQL开发等功能!本教程介绍如何在AnalyticDB MySQL中,一键加载内置数据集,并基于自动生成的查询脚本,运行复杂查询语句,秒级生成查询结果。
阿里云云原生数据仓库AnalyticDB MySQL版 使用教程
云原生数据仓库AnalyticDB MySQL版是一种支持高并发低延时查询的新一代云原生数据仓库,高度兼容MySQL协议以及SQL:92、SQL:99、SQL:2003标准,可以对海量数据进行即时的多维分析透视和业务探索,快速构建企业云上数据仓库。 了解产品 https://www.aliyun.com/product/ApsaraDB/ads
相关文章
|
2月前
|
存储 Oracle 关系型数据库
数据库数据恢复—ORACLE常见故障的数据恢复方案
Oracle数据库常见故障表现: 1、ORACLE数据库无法启动或无法正常工作。 2、ORACLE ASM存储破坏。 3、ORACLE数据文件丢失。 4、ORACLE数据文件部分损坏。 5、ORACLE DUMP文件损坏。
132 11
|
3月前
|
Oracle 关系型数据库 数据库
Oracle数据恢复—Oracle数据库文件有坏快损坏的数据恢复案例
一台Oracle数据库打开报错,报错信息: “system01.dbf需要更多的恢复来保持一致性,数据库无法打开”。管理员联系我们数据恢复中心寻求帮助,并提供了Oracle_Home目录的所有文件。用户方要求恢复zxfg用户下的数据。 由于数据库没有备份,无法通过备份去恢复数据库。
|
3月前
|
存储 Oracle 关系型数据库
oracle数据恢复—Oracle数据库文件大小变为0kb的数据恢复案例
存储掉盘超过上限,lun无法识别。管理员重组存储的位图信息并导出lun,发现linux操作系统上部署的oracle数据库中有上百个数据文件的大小变为0kb。数据库的大小缩水了80%以上。 取出&并分析oracle数据库的控制文件。重组存储位图信息,重新导出控制文件中记录的数据文件,发现这些文件的大小依然为0kb。
|
3月前
|
SQL Oracle 关系型数据库
Oracle数据库优化方法
【10月更文挑战第25天】Oracle数据库优化方法
69 7
|
2月前
|
存储 Oracle 关系型数据库
服务器数据恢复—华为S5300存储Oracle数据库恢复案例
服务器存储数据恢复环境: 华为S5300存储中有12块FC硬盘,其中11块硬盘作为数据盘组建了一组RAID5阵列,剩下的1块硬盘作为热备盘使用。基于RAID的LUN分配给linux操作系统使用,存放的数据主要是Oracle数据库。 服务器存储故障: RAID5阵列中1块硬盘出现故障离线,热备盘自动激活开始同步数据,在同步数据的过程中又一块硬盘离线,RAID5阵列瘫痪,上层LUN无法使用。
|
3月前
|
Oracle 关系型数据库 数据库
oracle数据库技巧
【10月更文挑战第25天】oracle数据库技巧
44 6
|
3月前
|
存储 Oracle 关系型数据库
Oracle数据库优化策略
【10月更文挑战第25天】Oracle数据库优化策略
45 5
|
4月前
|
存储 Oracle 关系型数据库
Oracle数据库的应用场景有哪些?
【10月更文挑战第15天】Oracle数据库的应用场景有哪些?
291 64
|
4月前
|
存储 Oracle 关系型数据库
数据库数据恢复—Oracle ASM磁盘组故障数据恢复案例
Oracle数据库数据恢复环境&故障: Oracle ASM磁盘组由4块磁盘组成。Oracle ASM磁盘组掉线 ,ASM实例不能mount。 Oracle数据库故障分析&恢复方案: 数据库数据恢复工程师对组成ASM磁盘组的磁盘进行分析。对ASM元数据进行分析发现ASM存储元数据损坏,导致磁盘组无法挂载。
|
4月前
|
监控 Oracle 关系型数据库
Oracle数据库性能优化
【10月更文挑战第16天】Oracle数据库性能优化是
56 1

推荐镜像

更多