ORA-00096: invalid value UNUSED for parameter plsql_code_type

ORA-00096: invalid value UNUSED for parameter plsql_code_type,must be from among NATIVE, INTERPRETE.
环境介绍:客户那边是一套 11.2.0.1.0的数据库,导出数据文件要导入正式生产环境,生产环境是11.2.0.4.0 ,大版本一致。现象:在导入到正式环境的时候一直报

import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
export client uses ZHS16GBK character set (possible charset conversion)
IMP-00003: ORACLE error 96 encountered
ORA-00096: invalid value UNUSED for parameter plsql_code_type, must be from among NATIVE, INTERPRETED
IMP-00000: Import terminated unsuccessfully

在官网查询这个参数plsql_code_type含义:

PLSQL_CODE_TYPE specifies the compilation mode for PL/SQL library units.

Values:

INTERPRETED

PL/SQL library units will be compiled to PL/SQL bytecode format. Such modules are executed by the PL/SQL interpreter engine.

NATIVE

PL/SQL library units (with the possible exception of top-level anonymous PL/SQL blocks) will be compiled to native (machine) code. Such modules will be executed natively without incurring any interpreter overhead.

由上可见,报如上错误,是因为sql在编译的时候依赖的编译器区别,INTERPRETED 编译器依赖于PL/SQL,NATIVE 编译器依赖于本地。
所以解决方法有两种:确定源数据库的编译环境,如果都是INTERPRETED,在确认一下源库跟目标库的PL/SQL的版本是否一致。
回到正题,环境介绍PL/SQL 版本一致,问题不应该出在这个地方。
最后再次跟客户沟通,得知他们电脑安装了一个PL/SQL Develpos 客户端,版本是 8.0.1.1,这次是使用这个图形化导出的。问题就出在这里,使用8的客户端导出数据文件在导入到11g就会出这个问题,最后客户使用11g的客户端重新导出一个数据文件,问题解决。
注意:plsql_code_type 这个参数是老版本的参数,新版本做保留参数,这个参数的值不能随意修改会造成大量的plsql解析失败,谨慎。

猜你喜欢

转载自blog.csdn.net/a743044559/article/details/79523277