DB2 10.5 for Linux, UNIX, and Windows

SET USAGE LIST STATE statement

The SET USAGE LIST STATE statement manages the state of a usage list and the associated data and memory.

This statement is not under transaction control.

Invocation

This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include DBADM or SQLADM authority.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-SET USAGE LIST--usage-list-name--STATE----------------------->

   .-=-.                      
>--+---+--+-ACTIVE--------+------------------------------------><
          +-INACTIVE------+   
          +-RELEASED------+   
          '-host-variable-'   

Description

usage-list-name
Identifies the usage list. The usage-list-name, including the implicit or explicit qualifier, must identify a usage list that is described in the catalog (SQLSTATE 42704).
ACTIVE
Indicates that the usage list is activated for monitoring. Memory for the usage list is allocated when the table or index is first referenced by a section. If the usage list is for a partitioned table or index then the memory is allocated when the data partition is first referenced by a section. In a partitioned database environment or DB2® pureScale® environment, memory is allocated at each member. If the usage list is already in the ACTIVE state then a warning is returned (SQLSTATE 01598).

On activation, the data in the usage list is removed and collection starts from the beginning of the list.

INACTIVE
Indicates that the usage list is deactivated for monitoring. If the state of a usage list is already set to INACTIVE then this keyword is ignored. If the state of the usage list for a partitioned table or index is set to INACTIVE, then the state of the usage list for each data partition is set to INACTIVE. If the state is already INACTIVE then this keyword is ignored. Similarly, in a partitioned database environment or DB2 pureScale environment, the state of the usage list for each member is set to INACTIVE. If the state is already INACTIVE then this keyword is ignored.

Data collected in the list is not removed when the state of the usage list is set to INACTIVE.

RELEASED
Indicates that the memory associated with a usage list is released. If the state of the usage list for a partitioned table or index is set to RELEASED, then the memory associated with each data partition is released. In a partitioned database environment or DB2 pureScale environment, the memory associated with each member is released.

Notes