Invoking Environment | ID Used |
---|---|
Any static SQL | Implicit or explicit value of the OWNER of the package the SQL invoking the routine came from. |
Used in definition of view or trigger | Definer of the view or trigger. |
Dynamic SQL from a run behavior package | ID used to make the initial connection to DB2. |
Dynamic SQL from a define behavior package | Definer of the routine that uses the package that the SQL invoking the routine came from. |
Dynamic SQL from an invoke behavior package | Current authorization ID invoking the routine. |
DYNAMICRULES Value | Behavior of Dynamic SQL Statements in a Standalone Program Environment | Behavior of Dynamic SQL Statements in a Routine Environment |
---|---|---|
BIND | Bind behavior | Bind behavior |
RUN | Run behavior | Run behavior |
DEFINEBIND | Bind behavior | Define behavior |
DEFINERUN | Run behavior | Define behavior |
INVOKEBIND | Bind behavior | Invoke behavior |
INVOKERUN | Run behavior | Invoke behavior |
Dynamic SQL Attribute | Setting for Dynamic SQL Attributes: Bind Behavior | Setting for Dynamic SQL Attributes: Run Behavior | Setting for Dynamic SQL Attributes: Define Behavior | Setting for Dynamic SQL Attributes: Invoke Behavior |
---|---|---|---|---|
Authorization ID | The implicit or explicit value of the OWNER BIND option | ID of User Executing Package | Routine definer (not the routine's package owner) | Current statement authorization ID when routine is invoked. |
Default qualifier for unqualified objects | The implicit or explicit value of the QUALIFIER BIND option | CURRENT SCHEMA Special Register | Routine definer (not the routine's package owner) | Current statement authorization ID when routine is invoked. |
Can execute GRANT, REVOKE, ALTER, CREATE, DROP, COMMENT ON, RENAME, SET INTEGRITY and SET EVENT MONITOR STATE | No | Yes | No | No |