Frequent error in Oracle ORA-04068: existing state of packages has been discarded

前端 未结 5 1625
再見小時候
再見小時候 2021-01-02 03:28

We\'re getting this error once a day on a script that runs every two hours, but at different times of the day.

ERROR at line 1:
ORA-04068: existing state of          


        
5条回答
  •  既然无缘
    2021-01-02 04:22

    The package has public or private variables. (Right?) This variables form the state a the package. If you compile the package in 3rd session. The next access to this package will throw the ORA-04068.

    The build timestamp of a package must be older than the package session state.

    If the package state is not needed for script running, the call DBMS_SESSION.RESET_PACKAGE at the beginning of your script. This cleans all package states of your session.

提交回复
热议问题