By Hugh Smith with Paul McWilliams.
You can now request that Db2 for z/OS generates more granular accounting trace records for distributed database (DDF) applications by using the new ACCTG(ALLCOMMIT) of the MODIFY DDF command. When this option is set, Db2 generates an accounting trace record occurrence after any commit or rollback. However, Db2 still maintains the WLM enclave that was created by Db2, prior to the initial requested transaction which left open resources. Also, Db2 maintains information so that when the DBAT is terminated after completing the work requests from its client connection, Db2 deletes the enclave and informs WLM of the transactions that were completed.
Requirements
You can use this new capability, only if your Db2 for z/OS environment meets the following requirements:
- The APAR OA61811 PTF is applied to z/OS
- The APAR PH55241 PTF applied to Db2 12 or Db2 13
- The CMTSTAT subsystem parameter is set to the recommended value: INACTIVE
Controlling granularity of the accounting records
To request that Db2 generates more granular accounting trace records for DDF applications, you issue a MODIFY DDF command with the ACCTG(ALLCOMMIT) option. When you issue a MODIFY DDF command with the ACCTG(ALLCOMMIT) option, Db2 issues the following message:
DSNL302I ACCTG IS SET TO ALLCOMMIT
To return to the existing default behavior, you can issue the following MODIFY DDF command, which includes the ACCTG keyword with no option value:
-MODIFY DDF ACCTG
For existing DDF threads, the specified ACCTG option takes effect only after the thread generates an accounting trace record at a commit or rollback with no open resources. Until then, the previously saved ACCTG option for the thread continues to control when it generates accounting trace records.
When this option is set back to its default setting, or if the setting was never changed, Db2 generates an accounting trace record when no open resource exists past a commit or rollback. If any of the following resources remain open and pending, Db2 does not generate an accounting trace record:
- Open WITH HOLD cursors
- Declared global temporary tables that are not dropped
- Unreleased LOB locators
- A commit processed by a stored procedure when running with 2-phase commit rules
- Allocated RELEASE DEALLOCATE packages (due to the -MODIFY DDF PKGREL(BNDOPT) option)
- Allocated KEEPDYNAMIC YES packages
However, if only one of the last two preceding resource types, but not both, are open after a commit or rollback, Db2 generates an accounting trace record occurrence after a commit or rollback.
The DISPLAY DDF command output displays the ACCTG setting in the DSNL106I message only if the ACCTG(ALLCOMMIT) setting is in effect.
When to expect more accounting trace volume
When the ACCTG(ALLCOMMIT) setting is used, the volume of accounting trace record occurrences increases. The size of the increase depends on whether distributed application workloads have many of the above open resource types. When no resources are left open after a commit or rollback, -MODIFY DDF ACCTG(ALLCOMMIT) has essentially no effect on the accounting trace record volume.
You can also use the following subsystem parameters to control the value and size of the accounting trace records:
- When set to a numeric value, the ACCUMACC value controls the volume of trace record occurrences.
- When set to ON, the SMFCOMP value controls size of accounting trace records.
#Db2forz/OS #Db2Znews #Db2z12 #db2z13