Behavior of EXPLAIN STMTCACHE with the access control authorization routine

The behavior of EXPLAIN STMTCACHE changes because in some instances the primary authorization ID replaces the statement authorization ID.

Begin program-specific programming interface information.

An EXPLAIN statement that specifies the STMTCACHE clause captures EXPLAIN records for the specified dynamic SQL statements and writes them to to EXPLAIN tables. Under this option, no new access path selection processing occurs. The EXPLAIN records are extracted from the existing access paths that were selected when the dynamic SQL statements were prepared and entered the statement cache.

Dynamic statements are cached in the dynamic statement cache by using the primary authorization ID that runs the plan or package regardless of the DYNAMICRULES value. Therefore, if the access control authorization routine is used for security, the EXPLAIN STMTCACHE statement must be issued with the same primary authorization ID that is used when inserting the dynamic statements into the cache.

End program-specific programming interface information.