Improving concurrency for IFI
When you design your application to use IFI, consider the potential for locking delays, including suspensions, timeouts and deadlocks.
About this task
Locks are obtained for IFI
in the following situations:
- When READS and READA requests are checked for authorization, short duration locks on the Db2 catalog are obtained. When the check is made, subsequent READS or READA requests are not checked for authorization. Remember, if you are using the access control exit routine, then that routine might be controlling the privileges that the monitor trace can use.
- When Db2 commands are submitted, each command is checked for authorization. Db2 database commands obtain additional locks on Db2 objects.
A program can issue SQL statements through an attachment facility and Db2 commands through IFI. This environment creates the potential for an application to deadlock or timeout with itself over Db2 locks acquired during the execution of SQL statements and Db2 database commands.
Procedure
To ensure that all Db2 locks acquired by preceding SQL statements are no longer held when the Db2 database command is issued: