ORA-00096: invalid value for parameter plsql_compiler_flags, must be from among NON_DEBUG, DEBUG, INTERPRETED, NATIVE


author:skate
time:2009/10/16

 

现象:
协助技术搭建一个测试库


源库:oracle11g
目标库:oracle9.2.0.4

考虑imp/exp版本兼容的问题,我用9i的client客户端exp 11g数据,然后再用9i的client客户端把数据imp进9i数据库,
结果就出现如下错误

 

[oracle@20081006-1724 ~]$ imp userid=sys/aibo fromuser=skate touser=skate file=/tmp/hpo520315.dmp log=/tmp/hpo5203152.log buffer=409600000 ignore=y

Import: Release 9.2.0.4.0 - Production on Fri Oct 16 12:09:01 2009

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


IMP-00058: ORACLE error 28009 encountered
ORA-28009: connection to sys should be as sysdba or sysoperUsername: sys as sysdba
Password:

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 AL32UTF8 character set and AL16UTF16 NCHAR character set
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


解决过程:

在网上google,发现如下方法


Solution Description --------------------

You need to set the plsql_compiler_flags parameter to another value then NATIVE before exporting your data.
So, either dynamically update this parameter with an 'alter system set' before exporting any data, for example:

SQL> alter system set plsql_compiler_flags=INTERPRETED,NON_DEBUG;

or update your init.ora to comment out this parameter (the default 'INTERPRETED','NON_DEBUG' will then be used)
or set it to any other possible values, such 'INTERPRETED'. If you change your init.ora, you need to restart your
database.

Explanation ----------- You are encountering a bug that will be fixed in the upcoming patchsets. plsql_compiler_flags
determines whether PL/SQL code is compiled native or interpreted and if debug information is included. Possible values
are:
'INTERPRETED' - compile in interpreted mode
'NATIVE' - compile in native mode
'DEBUG' - include debug information
'NON_DEBUG' - no debug information

Defaults are: 'INTERPRETED','NON_DEBUG'


但是无法解决,最后我把源库的数据库对象导出来为sql文件,然后再把sql文件在目标库上执行,最后通过Dblink完成字典表的初始化。
到此测试库搭建起来了,但编译数据库对象是发现N多对象没有编译通过,提示plsql_compiler_flags参数值不正确,想到刚才调整了这
个参数,于是查看下这个参数的当前值

 

SQL> show parameter plsql_compiler_flags

 

发现plsql_compiler_flags的值为”NATIVE“

 

于是更改参数plsql_compiler_flags为默认值,如下:

SQL> alter system set plsql_compiler_flags=INTERPRETED,NON_DEBUG;

 

结果在编译,都通过了

 

最后配置了分布式数据库的链接关系,至此一套测试环境搭建ok

 

考虑中:

 

我们目前总共需要三套测试,开发环境,要保证其中的版本一致问题,一直是我琢磨的问题,怎样做才可以把我解脱出来,只需要某人
运行一个命令,就可以保证版本一致


-------end-----

 

 

 

你可能感兴趣的:(oracle,数据库,System,character,compiler,oracle11g)