Interactions between profiles for monitoring threads and connections

When multiple profiles specify overlapping criteria, Db2® might apply such profiles in combination. However, Db2 might also apply one profile and exclude others, depending on the overlapping criteria.

Filtering scopes for monitoring threads and connections

The filtering scopes for profiles that monitor system resources are organized into several categories. Whenever more than one profile specifies criteria from the same category and from the same monitor function, only one profile is applied.
Table 1. Categories and columns used to specify valid profiles for monitoring system resources
Filtering category Columns to specify
Client IP address or domain name Specify only the LOCATION column. The value can be an IP address or domain name.

This category is the only accepted filtering criteria for profiles that specify the MONITOR CONNECTIONS.

Client product identifier Specify only the PRDID column.
Role or authorization identifier Specify one or all of the following columns:
  • ROLE
  • AUTHID

Profiles that specify both ROLE and AUTHID take precedence over profiles that specify only one value. Profiles that specify only ROLE take precedence over profiles that specify only AUTHID

Collection identifier or package name Specify only one or all of the following columns:
  • COLLID
  • PKGNAME

Profiles that specify both COLLID and PKGNAME take precedence over profiles that specify only one value. Profiles that specify only COLLID take precedence over profiles that specify only PKGNAME

Location name, or location alias Specify only the location name or location alias in LOCATION column.

This category applies only to profiles that specify MONITOR THREADS and MONITOR IDLE THREADS.

Client application name, user ID, or workstation ID. Specify only one of the following columns:
  • CLIENT_APPLNAME
  • CLIENT_USERID
  • CLIENT_WRKSTNNAME

Precedence of profiles for threads and connections

More than one profile might specify criteria that match the attributes of the same a thread or connection. Db2 applies only one profile when this happens for two profiles that specify the same monitoring function. The monitoring function is specified by the value in the matching row in the DSN_PROFILE_ATTRIBUTES table. The following rules apply to profiles that specify the same monitoring function and overlapping filtering criteria:
  • When multiple criteria are specified in the same category in different matching profiles, Db2 uses only the profile that defines the criterion that takes precedence in that category:
    • ROLE takes precedence over AUTHID.
    • COLLID takes precedence over PKGNAME.
  • When separate matching profiles specify different numbers of criteria from the same category, the more specifically defined profile is used. For example, when one profile specifies both ROLE and AUTHID, and another specifies only ROLE, Db2 uses only the profile that specifies both criteria.
  • When criteria from different categories are specified in separate profiles, Db2 uses all of the profiles in combination.
  • When a profile is defined that uses asterisk (*) values for filter criteria and other profiles define specific values, Db2 uses only the profile that specifies the specific values.
  • If two or more profiles from the same category specify the same exactly matching filtering criteria, only the profile with the newer timestamp is applied.
The result of these rules is that only the most specifically matching profile from the same category, for any single monitoring function, is applied to any incoming thread or connection. However, every accepted thread or connection still counts toward the evaluation of the profile thresholds for subsequent incoming threads or connections. When two profiles specify separate monitoring functions, Db2 applies both profiles to the incoming threads or connections that qualify, regardless of whether the profile criteria are from the same filtering category.

Order of profile evaluation for threads and connections

When more than one profile applies to a thread or connection, the evaluation of the different profiles is not simultaneous. Instead the profiles are evaluated in the following order, according to the criteria that are specified in the profile:
  1. IP address or domain name, in the LOCATION column.
  2. Product identifier, in the PRDID column.
  3. Role and authorization identifier, in both ROLE and AUTHID columns.
  4. Role, in the ROLE column only.
  5. Authorization identifier, in the AUTHID column only.
  6. Server location name, location alias, or database name, in the LOCATION column.
  7. Start of changeThe location name of a requester, for monitored threads from a Db2 for z/OS® requester.End of change
  8. Collection identifier and package name, in both COLLID and PKGNAME columns.
  9. Collection identifier, in the COLLID column only.
  10. Package name, in the PKGNAME column only.
  11. Client application name, in the CLIENT_APPLNAME column.
  12. Client user identifier, in the CLIENT_USERID column.
  13. Client workstation name, in the CLIENT_WRKSTNNAME column.
Only the first evaluated applicable profile is applied. Because the evaluation of multiple profiles is not simultaneous, the number of connections or threads on the subsystem might change during the evaluation of multiple profiles. Start of changeAny profile that specifies a specific value in a particular column has precedence over a profile that specifies a single-byte asterisk value ('*') in the same column.End of change