Invoke behavior
When the package is run as, or runs under, a stored procedure or a user-defined function package, Db2 processes dynamic SQL statements by using the invoke behavior.
The invoke behavior consists of the following attribute
values:
- Db2 uses the authorization
ID of the user-defined function or the stored procedure invoker to
check the authorization for dynamic SQL statements in the application
package. It uses the following rules:
- The current SQL ID of the invoker is checked for the required authorization.
- Secondary authorization IDs and roles that are associated with the primary authorization ID are also checked if they are needed for the required authorization.
- The default qualifier for unqualified objects is the user-defined function or the stored procedure invoker.
- Invoke behavior consists of the common attribute values for bind, define, and invoke behaviors.
When the package is run as a stand-alone program, Db2 processes dynamic SQL statements using bind
behavior or run behavior, depending on the DYNAMICRULES specified
value.