The FLUSH PACKAGE
CACHE statement invalidates all cached dynamic SQL statements in the
package cache. This invalidation causes the next request for any SQL
statement that matches an invalidated cached dynamic SQL statement
to be compiled instead of reused from the package cache.
Invocation
This statement can be embedded
in an application program or issued by using dynamic SQL statements.
It is an executable statement that can be dynamically prepared.
Authorization
The privileges that are 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 that is used for the cached entry is freed if the entry
is not in use when the FLUSH PACKAGE CACHE statement runs.
- Any cached dynamic SQL statement currently in use is allowed
to continue to exist in the package cache until it is no longer needed
by the current user. The next new user of the same statement will
force an implicit prepare of the statement, and the new user will
run the new version of the cached dynamic SQL statement.