电子设计工程
電子設計工程
전자설계공정
ELECTRONIC DESIGN ENGINEERING
2014年
23期
34-37
,共4页
程序包%全局变量%对象依赖%自动重编
程序包%全跼變量%對象依賴%自動重編
정서포%전국변량%대상의뢰%자동중편
package%global variable%object dependent%recompile automatically
针对pl/sql 程序包在运行中有时会出现"程序包失效"的异常情况,通过深入分析该错误与对象依赖机制、自动重编机制和程序包运行机制的关系,结合3个不同的实验,证实了该错误与程序包中全局变量/常量的独有特性有关,并提供了一种解决方案:对新开发程序包,应尽量避免使用全局变量,使用函数来代替全局常量;对现有程序包,在逐步实施代码改造同时,应密切监控错误的发生、定期检测失效的程序包并自动进行重新编译处理。
針對pl/sql 程序包在運行中有時會齣現"程序包失效"的異常情況,通過深入分析該錯誤與對象依賴機製、自動重編機製和程序包運行機製的關繫,結閤3箇不同的實驗,證實瞭該錯誤與程序包中全跼變量/常量的獨有特性有關,併提供瞭一種解決方案:對新開髮程序包,應儘量避免使用全跼變量,使用函數來代替全跼常量;對現有程序包,在逐步實施代碼改造同時,應密切鑑控錯誤的髮生、定期檢測失效的程序包併自動進行重新編譯處理。
침대pl/sql 정서포재운행중유시회출현"정서포실효"적이상정황,통과심입분석해착오여대상의뢰궤제、자동중편궤제화정서포운행궤제적관계,결합3개불동적실험,증실료해착오여정서포중전국변량/상량적독유특성유관,병제공료일충해결방안:대신개발정서포,응진량피면사용전국변량,사용함수래대체전국상량;대현유정서포,재축보실시대마개조동시,응밀절감공착오적발생、정기검측실효적정서포병자동진행중신편역처리。
The pl/sql package in the operation may appear sometimes “ORA-04068”error. The relationship of the error and object-dependent, automatic recompile and the package operating mechanism was analyzed deeply, and the global variables or constants’ unique characteristics are directly related to the error which was confirmed in three different experiments, then a solution to the error was provided:global variables should not appear and function should be used instead of global constants in new packages; For existing packages, the code should be transformed gradually, and at the same time, the error must be closely monitored, and the package must be recompiled automatically when invalid state is found by failure detection on a regular basis.