<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JUST DO IT ~

    我只想當個程序員

    plsql 包,tomcat jdbc 調用存儲過程老是報錯 ORA-06508: PL/SQL: could not find program unit being called:

    sqlplus 外面執行正常.

    tomcat調用老有問題.多調用幾次久正常.

     

    可能是包中的全局變量引起的.

     

     

    If so, that's because your package is stateful:

    The values of the variables, constants, and cursors that a package declares (in either its specification or body) comprise its package state. If a PL/SQL package declares at least one variable, constant, or cursor, then the package is stateful; otherwise, it is stateless.

    When you recompile the state is lost:

    If the body of an instantiated, stateful package is recompiled (either explicitly, with the "ALTER PACKAGE Statement", or implicitly), the next invocation of a subprogram in the package causes Oracle Database to discard the existing package state and raise the exception ORA-04068.

    After PL/SQL raises the exception, a reference to the package causes Oracle Database to re-instantiate the package, which re-initializes it...

    You can't avoid this if your package has state. I think it's fairly rare to really need a package to be stateful though, so you should revisit anything you have declared in the package, but outside a function or procedure, to see if it's really needed at that level. Since you're on 10g though, that includes constants, not just variables and cursors.

    But the last paragraph from the quoted documentation means that the next time you reference the package in the same session, you won't get the error and it will work as normal (until you recompile again).

     

    existing state of packages has been discarded means, that your Package had some sort of state.

    This is caused by a global variable (or constant) stored in your Package Body.

    Since the package has already been used in your session, Oracle assumes that this state is relevant for you. Some of these variables might have different values now, and when you recompile the Body, the values are reset.

    This exception is thrown, so that your clients know that they can't rely on those variables any more.

    You could try to remove all global variables and constants from the Package Body, or close your session and reconnect before calling the package again.

     

     

    參考:

    http://stackoverflow.com/questions/2502722/pl-sql-package-invalidated

     

    http://stackoverflow.com/questions/19376440/ora-06508-pl-sql-could-not-find-program-unit-being-called

    posted on 2014-07-16 21:14 小高 閱讀(1652) 評論(0)  編輯  收藏 所屬分類: Oracle

    導航

    <2014年7月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    統計

    常用鏈接

    留言簿(3)

    隨筆分類(352)

    收藏夾(19)

    關注的blog

    手冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲高清无在码在线无弹窗 | 9久久免费国产精品特黄| 久久WWW色情成人免费观看| 亚洲高清无在码在线无弹窗| 欧洲精品99毛片免费高清观看| 久久精品亚洲综合| 99国产精品视频免费观看| 亚洲视频在线观看网站| 亚洲一区在线免费观看| 亚洲人成www在线播放| 日本不卡免费新一二三区| 曰批全过程免费视频观看免费软件 | 亚洲黑人嫩小videos| 国产成人精品久久免费动漫| 亚洲a级在线观看| 国产成人免费a在线视频色戒| 免费精品国自产拍在线播放| 激情综合色五月丁香六月亚洲| 久久国产免费观看精品| 亚洲视频免费观看| 免费毛片网站在线观看| 色吊丝性永久免费看码| 亚洲国产精品嫩草影院在线观看| 亚洲a一级免费视频| 亚洲大成色www永久网址| 日韩精品电影一区亚洲| 99视频免费播放| 精品国产成人亚洲午夜福利| 免费一级黄色毛片| 午夜免费福利视频| 亚洲变态另类一区二区三区| 亚洲乱码无码永久不卡在线 | 在线免费观看一区二区三区| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 国产偷伦视频免费观看| 亚洲乱码日产精品BD在线观看| 国产免费观看a大片的网站| 国产在线精品免费aaa片| 色天使亚洲综合在线观看| 中文字幕亚洲电影| 日本精品人妻无码免费大全 |