You can improve the performance of database transactions with soft commit. Soft commit limits the number of times that the system writes journal entries associated with a transaction to disk.
Soft commit can improve transaction performance, but it might cause one or more transactions to be lost in the event of a system failure. Traditional commitment control on DB2 Universal Databaseā¢ for iSeriesā¢ ensures transaction durability, which means that when a transaction has been committed, the transaction persists on the system. Soft commit does not provide this durability, although it still ensures the atomicity of the transaction. In other words, the system guarantees a commit boundary, but one or more complete transactions might be lost in the event of a system failure.
To use soft commit, both for a particular job or across the system, specify *NO on the QIBM_TN_COMMIT_DURABLE environment variable. You can change this variable with the Add Environment Variable (ADDENVVAR) command.
For example, to request soft commit from a particular job, run the following command from the job:
ADDENVVAR ENVVAR (QIBM_TN_COMMIT_DURABLE) VALUE (*NO)
To request soft commit across the system, run the following command:
ADDENVVAR ENVVAR (QIBM_TN_COMMIT_DURABLE) VALUE (*NO) LEVEL (*SYS)
If the default case QIBM_TN_COMMIT_DURABLE environment variable has not been added, or if the environment variable has been set to any value other than *NO, the system does not use soft commit; instead, the system uses traditional commitment control so that the durability of transactions will be ensured.
You can check the existence of this new environment variable, and its value and level if it exists, using the Work with Environment Variables (WRKENVVAR) command.
For some transactions, the operating system chooses to ignore your request for soft commit, and instead, performs traditional commitment. This happens in some complex environments, where multiple database connections are required or DDL operations are underway. The operating system can determine when it is appropriate to perform the request and when it makes more sense to perform a traditional commitment operation. So it is not harmful to request soft commit in such environments.