IN_CONTEXT_ATTR - 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_CONTEXT_ATTR type is a record type that contains the following list of fields which are used by the IN_CONTEXT_ATTRIBUTES table type to store and pass the values of the various IN_CONTEXT namespace attributes between subprograms within the IN_DB_UTIL package. The values for these fields are visible using the IN_CONTEXT_PRINT procedure or fetched using the IN_CONTEXT_GET function or by querying the database directly using the SYS_CONTEXT function using the IN_CONTEXT namespace along with the specified attribute.

TYPE IN_CONTEXT_ATTR IS RECORD 
(  
TAG             VARCHAR2(10),  
STATUS          VARCHAR2(128),  
OPERATION       VARCHAR2(128),  
CALLED_BY       VARCHAR2(128),  
START_TIME      VARCHAR2(128),  
MAX_TIME        VARCHAR2(128),  
MAX_MINUTES     VARCHAR2(128),  
OBJECT          VARCHAR2(257),  
SUBOBJECT       VARCHAR2(257),  
TABLESPACE      VARCHAR2(128),  
BATCH_SIZE      VARCHAR2(128),  
BULK_LIMIT      VARCHAR2(128),  
PARALLEL        VARCHAR2(128),  
LOGGING         VARCHAR2(9),
SCHEMA_TARGET   VARCHAR2(40),  
SCHEMA_BASE     VARCHAR2(40),  
SCHEMA_VERSION  VARCHAR2(40),  
IS_SYNC_UPGRADE VARCHAR2(3),  
OS_USER         VARCHAR2(128),  
DB_SESSION      VARCHAR2(128)  );  
Field Name Description
TAG A unique identifier that is created when a program initializes the IN_DB_UTIL framework for the specified identifier. The TAG will persist until the calling program exits cleanly and the session is cleared. The TAG is used to ensure that any attempts by another instance of the program cannot interfere with the current instance already leveraging the identifier within the IN_CONTEXT namespace.

The default value is generated using the following command to return a random string of ten uppercase and alpha-numeric characters.

DBMS_RANDOM.STRING('X',10)

STATUS The status of the session associated with the specified identifier.

Possible options are IDLE or EXECUTING

The default is IDLE

OPERATION The name of the procedure that is currently executing under the specified identifier. This is the highest procedure in the call stack and is also referenced as the CALLER in some cases.
CALLED_BY The name of the procedure that called the procedure (OPERATION) that is currently executing under the specified identifier. This is the next highest procedure in the call stack (COUNT-1) and is also referenced as the CALLER_HIST in some cases.
START_TIME The timestamp for when the session was initialized or when the current unit of work was started. The START_TIME will also get updated to SYSTIMESTAMP anytime the IN_CONTEXT_SET procedure is used to either set the STATUS to EXECUTING or to explicitly set the START_TIME to record the start time for an operation within the namespace for the identifier.
MAX_TIME For procedures that include the MAX_MINUTES parameter; if a value greater than zero was supplied for the MAX_MINUTES parameter during session initialization then this will contain the calculated MAX_TIME timestamp. This defines an end point for when new operations can be picked up for execution. If MAX_TIME has elapsed then no new operations will be started and the procedure will terminate cleanly.
MAX_MINUTES For procedures that include the MAX_MINUTES parameter this field records the specified number of minutes which is used to define an end time (MAX_TIME) that a procedure is allowed to start new operations. If MAX_MINUTES has elapsed and the current time is greater than the calculated MAX_TIME, then no new operations will be started and the procedure will gracefully end without completing any remaining tasks that might have otherwise been executed had time not expired.

The default is 0 which is equal to unlimited.

OBJECT The primary or parent object name affected by the current actions executing under the specified identifier. This is usually a table name.
SUBOBJECT The name of the object affected by the current actions executing under the specified identifier. This could be an index, or column, or constraint.
TABLESPACE If applicable, the name of the tablespace that contains the OBJECT or SUBOBJECT affected by the current actions executing under the specified identifier.
BATCH_SIZE The batch size (number of rows) to populate work queues (cursors). Currently only used by CLEANUP_AUDIT_DATA and during IN_DB_UPGRADE SYNC operations. BATCH_SIZE is used to scope the size of transactions by providing a variable limit on the number of rows to process before committing a transaction.

Could also be used for TOP N constructs for SELECT, INSERT, UPDATE, DELETE, and MERGE operations to iterate over the data in smaller batches to keep transaction sizes smaller.

The default is 100,000 rows.

BULK_LIMIT Used to impose a variable limit on the number of rows to fetch at one time during a bulk collect from the work queue batch cursor.

Currently only leveraged by the IN_DB_UPGRADE SYNC operations (SYNC_TABLE_IN_DOC) during BULK COLLECT INTO with the LIMIT clause to throttle the number of rows collected and processed at one time to help reduce memory usage by the program.

Default is 10,000 rows.

PARALLEL

The degree of parallelism the session will be forced to use during execution. Can be used for operations that leverage the parallel parameter such as index creation or for parallel execution of qualifying SQL statements.

Default is 0 which is equal to CPU_COUNT minus 1 for less than 8 CPU's or minus 2 for 8 or more CPU's.

LOGGING

Used to define whether an operation is logged (LOGGING) or not logged (NOLOGGING) wherever possible. Commonly used during index creation.

Default is LOGGING.

SCHEMA_TARGET The target schema version during upgrades. This parameter is used by the IN_DB_UPGRADE package and specified when running the UPGRADE_SETUP procedure during Perceptive Content database upgrades. It is used to conditionally determine which schema changes are necessary.
SCHEMA_BASE The base version of the schema which only includes the version number without the schema type designators such as ‘a’ for advanced. This is used for a simplified schema check during conditional execution based on the schema version.
SCHEMA_VERSION The current schema version. This parameter contains the full schema version number including the type designators such as ‘a’ for Advanced if applicable.
IS_SYNC_UPGRADE

This parameter is used by the IN_DB_UPGRADE package to determine if the upgrade path uses the synchronization framework (SYNC) for the upgrade. This is for upgrades with a starting schema version less than 7.5.

Possible options are YES or NO.

The default is NO

OS_USER This is the operating system user name for the client process that initiated the database session and instantiated the framework using the IN_SESSION_SET procedure.

Default value is SYS_CONTEXT('USERENV', 'OS_USER')

DB_SESSION

This is the session identifier for the session that instantiated the framework using the IN_SESSION_SET procedure.

Default value is SID,SERIAL# of the session.