The FLUSH PACKAGE CACHE statement removes all cached
dynamic SQL statements currently in the package cache. This statement
causes the logical invalidation of any cached dynamic SQL statement
and forces the next request for the same SQL statement to be implicitly
compiled by DB2®.
Invocation
This statement can be embedded
in an application program or issued through the use of dynamic SQL
statements. It is an executable statement that can be dynamically
prepared.
Authorization
The privileges held by the
authorization ID of the statement must include SQLADM or DBADM authority.
Syntax
>>-FLUSH PACKAGE CACHE--DYNAMIC--------------------------------><
Notes
- This statement affects all cached dynamic SQL entries in the package
cache on all active database partitions.
- As cached dynamic SQL statements are invalidated, the package
cache memory used for the cached entry will be freed if the entry
is not in use when the FLUSH PACKAGE CACHE statement executes.
- Any cached dynamic SQL statement currently in use will be allowed
to continue to exist in the package cache until it is no longer needed
by the its current user; the next new user of the same statement will
force an implicit prepare of the statement by DB2, and the new user will execute the new version
of the cached dynamic SQL statement.