-549   THE statement STATEMENT IS NOT ALLOWED FOR object_type1 object_name BECAUSE THE BIND OPTION DYNAMICRULES(RUN) IS NOT IN EFFECT FOR object_type2

Explanation

A program attempted to issue the indicated SQL statement that is one of several SQL statements that cannot be issued from a plan or package for which the option DYNAMICRULES(RUN) is not in effect. Those SQL statements are:
  • Dynamic GRANT statement
  • Dynamic REVOKE statement
  • Dynamic ALTER statement
  • Dynamic CREATE statement
  • Dynamic DROP statement
The indicated SQL statement is bound to one of the following:
  • The named plan or package that was not bound with the option DYNAMICRULES(RUN)
  • The named package that was not bound with the DYNAMICRULES option, but is appended to a plan that was not bound with DYNAMICRULES(RUN)
statement
The SQL statement in error
object_type1
PACKAGE or DBRM
object_name
If object_type1 is PACKAGE, object_name is the name of the package in the format 'location-id.collection-id.package-id'.

If object_type1 is DBRM, object_name is the name of the DBRM in the format 'plan-name DBRM-name'.

object_type2
PLAN or PACKAGE

If object_type1 is PACKAGE, object_type2 can be either PACKAGE or PLAN (whichever is bound with a DYNAMICRULES value other than RUN).

If object_type1 is DBRM, object_type2 is PLAN.

System action

The statement cannot be processed.

Programmer response

Take one of the following actions to correct the error:
  • If the SQL statement is embedded, remove it, precompile and compile the application program again, and reissue the BIND command with the appropriate DYNAMICRULES option.
  • Use the SQL statement with a package or plan that is bound with DYNAMICRULES(RUN).
  • Issue the REBIND command with the DYNAMICRULES(RUN) option for the plan or package to which the SQL statement is bound.

Determine if either the SQL statement should be removed from the program or the plan or package should be rebound with the DYNAMICRULES(RUN) option.

SQLSTATE

42509