IN_SESSION_SET - Perceptive Content Database IN_DB_UTIL Package for Oracle Server - Foundation 24.1 - Foundation 24.1 - Ready - Perceptive Content - external

Perceptive Content Database IN_DB_UTIL Package for Oracle Server

Platform
Perceptive Content
Product
Perceptive Content Database IN_DB_UTIL Package for Oracle Server
Release
Foundation 24.1
License

The IN_SESSION_SET stored procedure is used to initialize the IN_DB_UTIL framework for a single identifier. It is responsible for claiming initial control or extending the call stack for the specified identifier and adjusting the context attributes to reflect the changes to the call stack.

This procedure should be executed whenever a procedure is running within the IN_DB_UTIL framework.

This procedure ensures the specified identifier is not already claimed by another session based on a comparison of the specified TAG.

This procedure calls the IN_CALLSTACK_EXTEND procedure to extend the call stack as well as set initial values for some of the IN_CONTEXT attributes.

If a procedure is setting up the framework and is scoped to ALL identifiers (SYNC and UPGRADE) then it must be called separately for both identifiers using the same TAG value.

If a TAG is not specified (NULL) then this procedure will generate a random string using the following command: DBMS_RANDOM.STRING('X',10);

The IN_SESSION_SET procedure is responsible for the following IN_DB_UTIL framework initialization steps:

  • Ensure there is not already different session executing under the specified identifier. If there is then the IS_EXECUTING exception will be raised.
  • Extend the framework call stack under the specified identifier.
  • IN_CALLSTACK_EXTEND
  • Set session level atributes of the IN_CONTEXT namespace for the specified identifier.

Any procedure leveraging the IN_DB_UTIL framework should have the following exceptions defined to properly handle the exceptions that could be raised by this procedure.

  • FAILED_CHECK – Invalid IDENTIFIER specified. Checked using the CHECK_PARAMETER procedure.
  • IS_EXECUTING – Returned if a procedure attempts to claim control or extend the call stack of an identifier that is already claimed by another session using a different TAG value.
  • OTHERS – Catch all other undefined exceptions.
Parameter Description
IDENTIFIER Type: INPUT
Datatype: VARCHAR2(128)
Default Value: IN_DB_UTIL
Description The identifier for the session attempting to claim control of the IN_CONTEXT namespace identifier. .
Options

IN_DB_UTIL

SYNC

UPGRADE.

TAG Type: INPUT
Datatype: VARCHAR2(10)
Default Value: DBMS_RANDOM.STRING('X',10)
Description: The unique tag associated with the session.
CONTEXT_OPERATION Type: INPUT
Datatype VARCHAR2(128)
Default Value: IN_DB_UTIL
Description Specifies the name of the procedure attempting to claim the IN_CONTEXT namespace to initialize the session within the framework, which includes extending the call stack for the specified identifier.

Exceptions

Examples

IN_DB_UTIL.IN_SESSION_SET(V_IDENTIFIER, V_TAG, V_CONTEXT_OPERATION); 
IN_DB_UTIL.IN_SESSION_SET('IN_DB_UTIL', V_TAG, 'AUDIT_DATA_CLEANUP');