2.358 SESSION_EXIT_ON_PACKAGE_STATE_ERROR
Use SESSION_EXIT_ON_PACKAGE_STATE_ERROR
to force a hard session exit when a session's state has been invalidated.
Exiting sessions after state invalidation avoids errors that can occur when applications mishandle an invalid state.
Property | Description |
---|---|
Parameter type |
Boolean |
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes |
Range of values |
|
Basic |
No |
Oracle RAC |
Different instances can use different values. |
Set SESSION_EXIT_ON_PACKAGE_STATE_ERROR
to TRUE
to force a hard session exit under the following circumstances:
-
When a stateful PL/SQL package undergoes modification, the sessions that have an active instantiation of the package receive an
ORA-4068
error when they attempt to run it. WhenSESSION_EXIT_ON_PACKAGE_STATE_ERROR
is set toTRUE
, the session immediately exits instead of raisingORA-04068
. This can be advantageous because many applications are better equipped to handle a session being discarded, and failing to catch errors related to session state, such asORA-04068
, can lead to silent data corruption. -
When an Oracle Database Multilingual Engine (MLE) module or environment is modified via DDL, sessions that have an active instantiation of the object receive an
ORA-4106
orORA-4107
error. SettingSESSION_EXIT_ON_PACKAGE_STATE_ERROR
toTRUE
forces sessions to be disconnected if the session state is invalidated. Because many applications capture session disconnect, this option can help simplify the recovery from the invalidation of an existing session state.
Note:
This parameter is available starting with Oracle Database 23ai.