The ALTER SERVICE CLASS statement alters the definition of a service class.
This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).
>>-ALTER SERVICE CLASS--service-class-name----------------------> >--+--------------------------------+---------------------------> '-UNDER--service-superclass-name-' .---------------------------------------------------------------------------------. V (1) | >--------+-AGENT PRIORITY--+-DEFAULT----------+------------------------------------+-+->< | '-integer-constant-' | +-PREFETCH PRIORITY--+-DEFAULT-+------------------------------------------+ | +-HIGH----+ | | +-MEDIUM--+ | | '-LOW-----' | +-OUTBOUND CORRELATOR--+-NONE------------+--------------------------------+ | '-string-constant-' | +-BUFFERPOOL PRIORITY--+-DEFAULT-+----------------------------------------+ | +-HIGH----+ | | +-MEDIUM--+ | | '-LOW-----' | | (2) | +-------COLLECT ACTIVITY DATA--+-| alter-collect-activity-data-clause |-+-+ | '-NONE-----------------------------------' | | .-BASE-----. | +-COLLECT AGGREGATE ACTIVITY DATA--+----------+---------------------------+ | +-EXTENDED-+ | | '-NONE-----' | | .-BASE-. | +-COLLECT AGGREGATE REQUEST DATA--+------+--------------------------------+ | '-NONE-' | | (3) .-BASE-----. | +-------COLLECT REQUEST METRICS--+----------+-----------------------------+ | +-NONE-----+ | | '-EXTENDED-' | | (4) | +-------ACTIVITY LIFETIME HISTOGRAM TEMPLATE--template-name---------------+ +-ACTIVITY QUEUETIME HISTOGRAM TEMPLATE--template-name--------------------+ +-ACTIVITY EXECUTETIME HISTOGRAM TEMPLATE--template-name------------------+ +-REQUEST EXECUTETIME HISTOGRAM TEMPLATE--template-name-------------------+ +-ACTIVITY ESTIMATEDCOST HISTOGRAM TEMPLATE--template-name----------------+ +-ACTIVITY INTERARRIVALTIME HISTOGRAM TEMPLATE--template-name------------+ '-+-ENABLE--+-------------------------------------------------------------' '-DISABLE-' alter-collect-activity-data-clause .-DATABASE PARTITION-. |----+-ON COORDINATOR--+--------------------+-+--+-WITHOUT DETAILS---------------------------+----| | .-DATABASE PARTITIONS-. | | .-,---------------. | '-ON ALL--+---------------------+--------' | V (5) | | '-WITH----+-DETAILS-----+-+--+------------+-' '-SECTION-----' '-AND VALUES-'
DB2 workload manager (WLM) does not assign service class agent priority to work being done within a fenced mode process (FMP). Fenced procedures do not run their logic within a service class. These fenced procedures run within the DB2 FMP and this work is not done by DB2 agents. As a reminder, DB2 WLM controls DB2 agents.
On UNIX operating systems and Linux, valid values are DEFAULT and -20 to 20 (SQLSTATE 42615). Negative values denote a higher relative priority. Positive values denote a lower relative priority.
On Windows operating systems, valid values are DEFAULT and -6 to 6 (SQLSTATE 42615). Negative values denote a lower relative priority. Positive values denote a higher relative priority.
If AGENT PRIORITY is DEFAULT for a service subclass, it inherits the AGENT PRIORITY value of its parent superclass. AGENT PRIORITY cannot be altered for a default subclass (SQLSTATE 5U032). AGENT PRIORITY must be set to DEFAULT if OUTBOUND CORRELATOR is set (SQLSTATE 42613).
chuser capabilities=CAP_NUMA_ATTACH,CAP_PROPAGATE
usermod -K defaultpriv=basic,proc_priocntl db2user
In
this example, proc_priocntl is added to the default privilege set
of user db2user.global# zonecfg -z db2zone
zonecfg:db2zone> set limitpriv="default,proc_priocntl"
In
this example, proc_priocntl is added to the limit privilege set of
zone db2zone.On Solaris 9, there is no facility for DB2 to raise the relative priority of agents. Upgrade to Solaris 10 or higher to use the service class agent priority.
PREFETCH PRIORITY cannot be altered for a default subclass (SQLSTATE 5U032).
If OUTBOUND CORRELATOR is set to a string-constant for the service superclass and OUTBOUND CORRELATOR NONE is set for a service subclass, the service subclass inherits the OUTBOUND CORRELATOR of its parent. OUTBOUND CORRELATOR must be set to NONE if the AGENT PRIORITY is not set to DEFAULT (SQLSTATE 42613).
BUFFERPOOL PRIORITY cannot be altered for a default subclass (SQLSTATE 5U032).
ALTER SERVICE CLASS PETSALES AGENT PRIORITY -20
ALTER SERVICE CLASS BARNSALES OUTBOUND CORRELATOR 'osLowPriority'