zoukankan      html  css  js  c++  java
  • oracle本地编译问题

    oracle10.2:

    --将过程重新编译为本地编译方式,提示有编译错误,经查提示未设置plsql_native_library_dir 参数

    SQL> alter procedure p_xxxx compile plsql_code_type=native;
     
    Warning: Procedure altered with compilation errors
     
    SQL> show error
    Errors for PROCEDURE ZZQ2.P_UPDATE_GRAPHCODE:
     
    LINE/COL ERROR
    -------- -----------------------------------------------
    12/53    PLS-00920: 未设置 plsql_native_library_dir 参数

    --因此设置plsql_native_library_dir参数,在oracle的home路径下创建nativelib文件夹(有的话就不用了)
     
    SQL> alter system set plsql_native_library_dir='D:oracleproduct10.2.0db_2plsql ativelib' scope=both

      2  /
     
    System altered
     
    SQL> show parameter plsql
     
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    plsql_ccflags                        string      
    plsql_code_type                      string      NATIVE
    plsql_compiler_flags                 string      NATIVE, NON_DEBUG
    plsql_debug                          boolean     FALSE
    plsql_native_library_dir             string      D:oracleproduct10.2.0db_2plsql ativelib
    plsql_native_library_subdir_count    integer     0
    plsql_optimize_level                 integer     2
    plsql_v2_compatibility               boolean     FALSE
    plsql_warnings                       string      DISABLE:ALL


     --设置plsql_native_library_subdir_count参数,在nativelib文件下创建5个文件夹d0,d1,d2,d3,d4
    SQL> alter system set plsql_native_library_subdir_count=5 scope=both;
     
    System altered
     
    SQL> show parameter plsql
     
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    plsql_ccflags                        string      
    plsql_code_type                      string      NATIVE
    plsql_compiler_flags                 string      NATIVE, NON_DEBUG
    plsql_debug                          boolean     FALSE
    plsql_native_library_dir             string      D:oracleproduct10.2.0db_2plsql ativelib
    plsql_native_library_subdir_count    integer     5
    plsql_optimize_level                 integer     2
    plsql_v2_compatibility               boolean     FALSE
    plsql_warnings                       string      DISABLE:ALL
     

    --这时再将过程编译为本地编译,结果还是有编译错误
    SQL> alter procedure p_xxxxxx compile plsql_code_type=native;
     
    Warning: Procedure altered with compilation errors
     
    SQL> show error
    Errors for PROCEDURE ZZQ2.P_UPDATE_GRAPHCODE:
     
    LINE/COL ERROR
    -------- -----------------------------------------------------------------------------------------------------------------------------------------------------
    0/0      PLS-00923: 本机码编译失败: Visual Studio not found::Could not open registry key HKEY_LOCAL_MACHINESOFTWAREMICROSOFTVISUALSTUDIO7.1SETUP:No error

    查了好久还是不知道具体原因,说是需要安装Pro*C/C++环境,但是这个查看已经有了,装oracle的时候已经给装上了。

    oracle11.2

    本地编译不需向10g那样设置一堆参数,直接执行如下语句就可以将其编译为本地编译方式

    alter procedure p_xxxx compile plsql_code_type=native;

    plsql_native_library_dir和plsql_native_library_subdir_count参数到11.2g已经没有了。


     

  • 相关阅读:
    C++ calculate the time cost in 100 nanoseconds precision
    C++ append file via ofstream
    WCF Server Error in '/' Application.
    Webclient "The operation has timed out" and override webclient with customized timeout
    WPF implement SelectedCommand in MVVM via Interaction.Triggers
    将EDGE浏览器首页中的hao123删除的方法--干净的界面
    PHP 获取当前时间的下一个整点时间
    微信小程序添加空格
    为什么upload下的图片不存在,会报模块不存在的错误
    lnmp环境搭建
  • 原文地址:https://www.cnblogs.com/lanzi/p/3184977.html
Copyright © 2011-2022 走看看