The IN_SESSION_CLEAR_ALL stored procedure can be used to unconditionally reset the entire call stack and session attributes for the specified identifier(s) of the IN_CONTEXT namespace.
Under normal circumstances, the IN_SESSION_CLEAR_ALL procedure should never need to be executed. However, it can be used to manually clear the entire call stack and session attributes for the specified identifier if necessary due to an unhandled exception or after manually cancelling an operation before completion.
Important Do not manually execute this procedure if any operations are still in progress as it will clear the call stack and session attributes which will lead to undesired results and unhandled exceptions.
| Parameter | Description | |
|---|---|---|
| IDENTIFIER | Type: | OUTPUT |
| Datatype | VARCHAR2(128) | |
| Default Value: | ALL | |
| Description | The identifier for which to clear the all session attributes. | |
| Options |
ALL (SYNC and UPGRADE) SYNC UPGRADE IN_DB_UTIL |
|
Exceptions
Examples
The following example demonstrates how to use this procedure to manually clear the entire call stack and session attributes for both the SYNC and UPGRADE identifiers of the IN_CONTEXT namespace.
Important Do not manually execute this procedure if any operations are still in progress.
IN_DB_UTIL.IN_SESSION_CLEAR_ALL('ALL');
Example output
The following example demonstrates the clearing of the UPGRADE identifier by executing the IN_SESSION_CLEAR_ALL procedure to clear the call stack and session attributes after cancelling the IN_DB_UPGRADE.UPTIME_STEPS procedure prior to completion.
SQL> EXEC IN_DB_UTIL.IN_CALLSTACK_PRINT;
***** Call Stack Begin *****
The SYNC CALLSTACK is empty.
***** UPGRADE Call Stack *****
Depth Tag Procedure
------ ------------ -----------------------------------
1 72S0FD50LL UPTIME_STEPS
2 72S0FD50LL SCHEMA_UPGRADE_7403_7500
3 72S0FD50LL UPTIME_STEPS_IN_DOC
4 72S0FD50LL CREATE_INDEXES_IN_DOC
***** Call Stack End *****
PL/SQL procedure successfully completed.
SQL> EXEC IN_DB_UTIL.IN_CONTEXT_PRINT;
Current DB Time: 2022-08-05 08:02:43.386000
Current UTC Time: 2022-08-05 13:02:43.386000
Current Activity for the SYNC identifier:
SYNC TAG: NULL
SYNC STATUS: IDLE
SYNC OPERATION: NULL
SYNC CALLED BY: NULL
SYNC START TIME: NULL
SYNC MAX TIME: NULL
SYNC MAX MINUTES: NULL
SYNC OBJECT: NULL
SYNC SUBOBJECT: NULL
SYNC TABLESPACE: NULL
SYNC BATCH SIZE: NULL
SYNC BULK LIMIT: NULL
SYNC PARALLEL: NULL
SYNC LOGGING: NULL
SYNC OS USER: NULL
SYNC DB_SESSION: NULL
Current Activity for the UPGRADE identifier:
UPGRADE TAG: 72S0FD50LL
UPGRADE STATUS: EXECUTING
UPGRADE OPERATION: CREATE_INDEXES_IN_DOC
UPGRADE CALLED BY: UPTIME_STEPS_IN_DOC
UPGRADE START TIME: 2022-08-05 08:02:43.386000
UPGRADE MAX TIME: 2022-08-05 09:02:42.975000
UPGRADE MAX MINUTES: 60
UPGRADE OBJECT: NEW_DOC
UPGRADE SUBOBJECT: NEW_DOC_IDX83
UPGRADE TABLESPACE: INDX
UPGRADE PARALLEL: 4
UPGRADE LOGGING: LOGGING
UPGRADE SCHEMA TARGET: 7.7.0.0
UPGRADE SCHEMA VERSION: 7.1.3.3
UPGRADE IS SYNC UPGRADE: YES
UPGRADE OS USER: LOCAL_DOMAIN\USER_NAME
UPGRADE DB_SESSION: 255
PL/SQL procedure successfully completed.
SQL> EXEC IN_DB_UTIL.IN_SESSION_CLEAR_ALL('UPGRADE');
PL/SQL procedure successfully completed.
SQL> EXEC IN_DB_UTIL.IN_CALLSTACK_PRINT;
***** Call Stack Begin *****
The SYNC CALLSTACK is empty.
The UPGRADE CALLSTACK is empty.
***** Call Stack End *****
PL/SQL procedure successfully completed.
SQL> EXEC IN_DB_UTIL.IN_CONTEXT_PRINT;
Current DB Time: 2022-08-05 08:07:46.745000
Current UTC Time: 2022-08-05 13:07:46.745000
Current Activity for the SYNC identifier:
SYNC TAG: NULL
SYNC STATUS: IDLE
SYNC OPERATION: NULL
SYNC CALLED BY: NULL
SYNC START TIME: NULL
SYNC MAX TIME: NULL
SYNC MAX MINUTES: NULL
SYNC OBJECT: NULL
SYNC SUBOBJECT: NULL
SYNC TABLESPACE: NULL
SYNC BATCH SIZE: NULL
SYNC BULK LIMIT: NULL
SYNC PARALLEL: NULL
SYNC LOGGING: NULL
SYNC OS USER: NULL
SYNC DB_SESSION: NULL
Current Activity for the UPGRADE identifier:
UPGRADE TAG: NULL
UPGRADE STATUS: IDLE
UPGRADE OPERATION: NULL
UPGRADE CALLED BY: NULL
UPGRADE START TIME: NULL
UPGRADE MAX TIME: NULL
UPGRADE MAX MINUTES: NULL
UPGRADE OBJECT: NULL
UPGRADE SUBOBJECT: NULL
UPGRADE TABLESPACE: NULL
UPGRADE PARALLEL: NULL
UPGRADE LOGGING: NULL
UPGRADE SCHEMA TARGET: NULL
UPGRADE SCHEMA VERSION: 7.1.3.3
UPGRADE IS SYNC UPGRADE: NULL
UPGRADE OS USER: NULL
UPGRADE DB_SESSION: NULL
PL/SQL procedure successfully completed.