The SET_ROUTINE_OPTS procedure sets the options that are to be used for the creation of SQL procedures in the current session. This setting overrides the instance-wide setting specified in the DB2_SQLROUTINE_PREPOPTS registry variable.
The schema is SYSPROC.
Specified options are valid for the duration of the session. If the null value is specified as the argument, the value of the DB2_SQLROUTINE_PREPOPTS registry variable is restored as the default options setting for the current session. For a list of the allowed options, see the description of the DB2_SQLROUTINE_PREPOPTS registry variable under "Query compiler variables".
In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the procedure is automatically created.
CALL SYSPROC.SET_ROUTINE_OPTS(CAST (NULL AS VARCHAR(1)))
CALL SET_ROUTINE_OPTS('EXPLAIN YES')
CALL SET_ROUTINE_OPTS('EXPLAIN YES BLOCKING NO')