Setting the priority of stored procedures

Stored procedure priority is inherited from the caller. The stored procedure always runs at the dispatching priority of whatever called it.

About this task

For example, if you call a stored procedure from CICS®, it runs at CICS priority. If you call a stored procedure from batch, it runs at batch priority. If you call a stored procedure from DDF, it runs at DDF priority.

Procedure

To set stored procedure priority:

  1. When you set up WLM, ensure that the WLM address spaces are set up with the default started task priority. WLM address spaces that use the default started task priority perform system administrative work more efficiently.
  2. Set up your service classes for the regular DB2® threads according to the priority that you want to give to the stored procedure callers. The stored procedure has the same priority as its caller.