ORACLE 11G資料庫遷移到9I報 IMP-00003 ORA-00096 IMP-00000

來源:互聯網
上載者:User

      今天有個朋友問我為什麼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]

本文出自 “認真就輸” 部落格,請務必保留此出處http://luoping.blog.51cto.com/534596/1161921

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.