The IN_DB_UTIL_SP_SESSION_UPDATE_ATTRIBUTES stored procedure can be used for updating a subset of the IN_DB_UTIL framework session attributes (parameters) at any point after session initialization.
This procedure should only be executed after session initialization has occurred if you want to update any session attributes for the specified identifier(s).
It is expected that other session attributes such as CALLER, CALLER_HIST, MAX_MINUTES, BATCH_SIZE, and any other attributes not being updated, have already been defined during session initialization by the IN_DB_UTIL_SP_SESSION_SET_ATTRIBUTES procedure.
The IN_DB_UTIL_SP_SESSION_UPDATE_ATTRIBUTES procedure will update the following session attributes:
STATUS, START_TIME, OBJECT, SUBOBJECT, FILEGROUP, MAX_DOP, FILL_FACTOR, SCHEMA_TARGET, SCHEMA_VERSION, SCHEMA_BASE, SCHEMA_TYPE, DATATYPE, DATABASE_EDITION, ISIN_DB_UTIL_SP_SESSION_SET_ATTRIBUTES_SYNC_UPGRADE, DEBUG.
Parameter | Description | |
---|---|---|
SESSION_PARAMETERS | Type: | INPUT |
Datatype: | IN_DB_UTIL_TY_SESSION_ATTR | |
Default Value: | NULL | |
Description | User-defined table type variable used to pass the values of all the
supported attributes for the IN_DB_UTIL framework. See the IN_DB_UTIL_TY_SESSION_ATTR definition above for more details. |
|
V_RETURN_VAL | Type: | RETURN |
Datatype: | INTEGER | |
Default Value: | 0 | |
Description | Specifies whether the execution of the procedure was successful or
not. 0 = SUCCESS 1 = ERROR |
Examples
The following example updates the OBJECT, SUBOBJECT, and FILEGROUP attributes (parameters) within the @V_SESSION_PARAMETERS table variable and then passes it to the IN_DB_UTIL_SP_SESSION_UPDATE_ATTRIBUTES procedure to update the session attributes in the IN_DB_UTIL_SESSION_ATTRIBUTES table.
Once the following is completed, the subsequent execution of the IN_DB_UTIL_SP_SESSIONS_DISPLAY procedure would reflect the updates and show that the associated session is working on the specified OBJECT (table), SUBOBJECT (index) and FILEGROUP. This facilitates a certain degree of visibility from any other session into the actions being preformed by the session consuming the specified identifier(s).
UPDATE @V_SESSION_PARAMETERS SET OBJECT = @V_TABLE_FQN ,SUBOBJECT = @V_INDEX_NAME ,FILEGROUP = @V_FILEGROUP_NAME; EXEC IN_DB_UTIL_SP_SESSION_UPDATE_ATTRIBUTES @V_SESSION_PARAMETERS;