DYNAMICRULES

Specifies which authorization identifier to use when dynamic SQL in a package is executed.

Syntax:

DYNAMICRULES={BIND | RUN | DEFINE | DEFINEBIND | DEFINERUN | 
               INVOKE | INVOKEBIND | INVOKERUN}
NODYNAMICRULES

Parameters:

BIND Indicates that the authorization identifier used for the execution of dynamic SQL is the package owner.
RUN Indicates that the authorization identifier used for the execution of dynamic SQL is the authid of the person executing the package.
DEFINE Indicates that the authorization identifier used for execution of dynamic SQL is the definer of the UDF or stored procedure. This option is not supported by DB2.
DEFINEBIND If the package is used within a routine context, the authorization identifier of the routine definer is to be used for authorization checking and for implicit qualification of unqualified object references within dynamic SQL statements within the routine.

If the package is used as a standalone application, dynamic SQL statements are processed as though the package were bound with DYNAMICRULES BIND.

DEFINERUN If the package is used within a routine context, the authorization identifier of the routine definer is to be used for authorization checking and for implicit qualification of unqualified object references within dynamic SQL statements within the routine.

If the package is used as a standalone application, dynamic SQL statements are processed as though the package were bound with DYNAMICRULES RUN.

INVOKE Indicates that the authorization identifier used for the execution of dynamic SQL is the invoker of the UDF or stored procedure. This option is not supported by DB2.
INVOKEBIND If the package is used within a routine context, the current statement authorization identifier in effect when the routine is invoked is to be used for authorization checking of dynamic SQL statements and for implicit qualification of unqualified object references within dynamic SQL statements within that routine.

If the package is used as a standalone application, dynamic SQL statements are processed as though the package were bound with DYNAMICRULES BIND.

INVOKERUN If the package is used within a routine context, the current statement authorization identifier in effect when the routine is invoked is to be used for authorization checking of dynamic SQL statements and for implicit qualification of unqualified object references within dynamic SQL statements within that routine.

If the package is used as a standalone application, dynamic SQL statements are processed as though the package were bound with DYNAMICRULES RUN.

Properties:

Default: NODYNAMICRULES