Today, a friend asked me why 11g exp files cannot be imported into 9I? Due to the incompatibility of exp/imp tools, when importing a database of a higher version to a lower version, you need to use the exp/imp tool of a lower version for import and export. A friend used 9i exp to export 11G data and then import imp to 9i. The import is normal. However, I reported an error in my own test environment. The error message is as follows:
- [oracle9i@rhel4 admin]$ exp scott/oracle@orcl11g file='/tmp/scott_test_exp.sql' tables='test_exp' rows=N;
-
- Export: Release 9.2.0.4.0 - Production on Fri Mar 22 06:18:38 2013
-
- Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
-
-
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export done in US7ASCII character set and AL16UTF16 NCHAR character set
- server uses ZHS16GBK character set (possible charset conversion)
- Note: table data (rows) will not be exported
-
- About to export specified tables via Conventional Path ...
- . . exporting table TEST_EXP
- Export terminated successfully without warnings.
-
- [oracle9i@rhel4 admin]$ imp scott/oracle file='/tmp/scott_test_exp.dmp' tables='test_exp'
-
- Import: Release 9.2.0.4.0 - Production on Fri Mar 22 07:08:59 2013
-
- Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
-
-
- Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP and Oracle Data Mining options
- JServer Release 9.2.0.4.0 - Production
-
- Export file created by EXPORT:V09.02.00 via conventional path
- import done in US7ASCII character set and AL16UTF16 NCHAR character set
- import server uses ZHS16GBK character set (possible charset conversion)
- IMP-00003: ORACLE error 96 encountered
- ORA-00096: invalid value for parameter plsql_compiler_flags, must be from among NON_DEBUG, DEBUG, INTERPRETED, NATIVE
- IMP-00000: Import terminated unsuccessfully
At 11G, the show parameter command cannot find the plsql_compiler_flags PARAMETER, which is replaced by another PARAMETER.
No solution was found after error codes related to GOOGLE, BAIDU, and METALINK. Change the keyword plsql_compiler_flags and find the solution in metalink as follows:
- [oracle11g@rhel4 admin]$ sqlplus / as sysdba
-
- SQL*Plus: Release 11.2.0.3.0 Production on Fri Mar 22 07:27:50 2013
-
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
-
-
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
- SQL> CREATE OR REPLACE VIEW exu9defpswitches (
- 2 compflgs, nlslensem ) AS
- 3 SELECT a.value, b.value
- 4 FROM sys.v$parameter a, sys.v$parameter b
- 5 WHERE a.name = 'plsql_code_type' AND
- 6 b.name = 'nls_length_semantics'
- 7 ;
-
- View created.
Normal for exporting and importing again
- [oracle9i@rhel4 admin]$ exp scott/ORACLE@orcl11g file='/tmp/scott_test_exp.dmp' tables='test_exp';
-
- Export: Release 9.2.0.4.0 - Production on Fri Mar 22 07:25:43 2013
-
- Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
-
-
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export done in US7ASCII character set and AL16UTF16 NCHAR character set
- server uses ZHS16GBK character set (possible charset conversion)
-
- About to export specified tables via Conventional Path ...
- . . exporting table TEST_EXP 74622 rows exported
- Export terminated successfully without warnings.
- [oracle9i@rhel4 admin]$ imp scott/oracle file='/tmp/scott_test_exp.dmp' tables='test_exp'
-
- Import: Release 9.2.0.4.0 - Production on Fri Mar 22 07:25:51 2013
-
- Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
-
-
- Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP and Oracle Data Mining options
- JServer Release 9.2.0.4.0 - Production
-
- Export file created by EXPORT:V09.02.00 via conventional path
- import done in US7ASCII character set and AL16UTF16 NCHAR character set
- import server uses ZHS16GBK character set (possible charset conversion)
- . importing SCOTT's objects into SCOTT
- . . importing table "TEST_EXP" 74622 rows imported
- Import terminated successfully without warnings.
Change to the original view definition in 11G
- [oracle11g@rhel4 sql]$ sqlplus / as sysdba
-
- SQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 25 02:15:51 2013
-
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
-
-
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
- SQL> CREATE OR REPLACE VIEW exu9defpswitches (
- 2 compflgs, nlslensem ) AS
- 3 SELECT a.value, b.value
- 4 FROM sys.v$parameter a, sys.v$parameter b
- 5 WHERE a.name = 'plsql_compiler_flags' AND
- 6 b.name = 'nls_length_semantics'
- 7 ;
-
- View created.
-
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
Reference:
Export From 11g using EXP Utility Version 9iR2 Produces Corrupt Export Dump [ID 550740.1]
This article from "seriously lose" blog, please be sure to keep this source http://luoping.blog.51cto.com/534596/1161921