SET_SESSION_LONGOPS procedure - Set and register progress of long operations
Use the SET_SESSION_LONGOPS procedure to store, in the SYSTOOLS.SESSON_LONGOPS table, information about the progress of long operations. The APPLICATION_HANDLE column of this table is used to identify the row in which the information is to be stored.
Syntax
Procedure parameters
- rindex
-
An expression that returns an INTEGER value that indicates whether the procedure is to update or insert a row in the SYSTOOLS.SESSION_LONGOPS table:
- A value other than -1 indicates that the procedure is to update all rows whose APPLICATION_HANDLE value equals the specified value. If there is no such row, the procedure takes no action.
- The value -1 indicates that the procedure is to insert a new row. The first time the procedure is called with rindex set to -1, it inserts a row and sets the APPLICATION_HANDLE value of that row to 100; the second time, it inserts a new row and sets the APPLICATION_HANDLE value of that row to 101; and so on.
- slno
-
An expression that returns a INTEGER. This position is for internal use; the specified value is ignored.
- op_name
-
An expression that returns a VARCHAR(64) value that specifies the name of the long running task.
- target
-
An expression that returns an INTEGER value that indicates which table or other database object is being worked on.
- context
-
An expression that returns a INTEGER value that indicates the context.
- sofar
-
An expression that returns a DECFLOAT(16) value that indicates the amount of work done so far.
- totalwork
-
An expression that returns a DECFLOAT(16) value that indicates the amount of total work.
- target_desc
-
An expression that returns a VARCHAR(32) value that describes the object being manipulated.
- units
-
An expression of the units in which
sofar
andtotalwork
are being represented. The value returned has a data type of VARCHAR(32).
Authorization
EXECUTE privilege on the DBMS_APPLICATION_INFO module.
Example
- The value -1 in the first position indicates that the procedure is to insert a new row.
- The value 2 in the second position is ignored.
- All other values are specified as required by the application.
db2 " CALL DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS(-1, 2, 'DBMS_APPLICATION_INFO', 4, 5, 6, 7, 'PROCEDURE', 'ENTRIES')"