DB2 graphic QMF Version 8

Resource group scheduled controls

Scheduled controls are active for the duration of a defined schedule. For example, if a schedule starts at 8 p.m. and stops after 5 p.m., then the associated controls will be in effect during those times and only those times. Governor supports up to 255 schedules per resource group, providing enough flexibility to properly control resource consumption.

All date, day, and time criteria are inclusive. For example, if the stop after time is 5 p.m., then the schedule will be active at 17:00:01, 17:00:02, through 17:00:59. The schedule will not be ignored until after 17:00:59.

As an administrator, you must define a value for each control. For each control, you can set online values separately from batch values. Again, this should provide enough flexibility to properly control both online resource consumption and batch resource consumption.

Prompt limits and cancel limits

If a cancel limit is exceeded, then the HPO/Governor module cancels the current QMF command. If a prompt limit is exceeded (and the corresponding cancel limit is not exceeded), then a dialog begins with the user. This dialog explains which resource limit has been exceeded and asks the user for a response to one of these questions:

Notice that there is no batch prompt limit because it is not possible to invoke a dialog with the user in batch mode.

CPU time limits

Governor can control the amount of CPU time consumed for each distinct command. When a user issues a command, Governor begins to monitor CPU consumption. If a QMF command completes before the defined limits are exceeded, Governor resets its internal counters back to zero and waits for the next command to be issued.

Fetched row limits

Governor can control the number of rows fetched from the database for each distinct command. When a user issues a command, Governor begins to quantify fetched rows. If a QMF command completes before the defined limits are exceeded, Governor resets its internal counters back to zero and waits for the next command to be issued.

However, a command such as RUN can be followed by a series of related commands (such as, DOWN). When related commands are detected, these internal counters will not be reset to zero. Instead these related commands are treated as extensions of the primary command.

To understand how Governor behaves, consider a scenario in which a user issues a RUN QUERY command. Assume that you want to limit the number of fetched rows to 1000. When the RUN command is issued, QMF fetches rows from the database until it is ready to display the first screen of data. Once the screen is displayed to the user the RUN command ends. When the user presses PF8 to view the next panel of data, a new command is issued, namely the DOWN command. As the user repeatedly presses PF8 and proceeds down the table, QMF will access more and more rows from the database.

Governor limits the number of fetched rows from the beginning of the primary command (RUN) until the end of the last related command (DOWN). That is, when related commands are detected, internal counters tracking the number of fetched rows will not be reset to zero. Using the scenario above, the limit of 1000 will not be reached until the sum of rows fetched from the RUN command and subsequent DOWN commands exceeds 1000.

Schedule definitions (date, day of the week, time of day)

You can define up to 255 schedules per resource group. The first schedule in which the date, day, and time definition match the current date, day, and time will become the active schedule. Schedules are checked in numerical order. That is, schedule 1 is checked first, schedule 2 is checked second, and so on (schedule 255 is checked last). The priority of checking to determine which set of controls is active is defined below:

1. Start and Stop Date
If the current date is within this specified range, then the day field is checked next.
2. Start and Stop Day
If the current day is within this specified range, then the time field is checked next.
3. Start and Stop Time
If the current time is within this specified range, then this schedule's controls are in effect.

All ranges are inclusive, so that if the Start Date is 20990101, then the schedule would become active after midnight on 20981231. The order of checking is Date followed by Day Of The Week followed by Time Of Day. Therefore, if the Day does not coincide with the Date, the schedule will never be in effect.

If Start and Stop Times wrap around midnight (for example, 5 p.m. through 8 a.m.), this creates, in effect, two separate blocks of time each day that the schedule becomes active. Consider the following schedule as an example:

Start Date: 20990111 (January 11, 2099)
Stop Date: 20990131 (January 31, 2099)
Start Day: 2 (Monday)
Stop Day: 6 (Friday)
Start Time: 1700 (5 p.m.)
Stop Time: 0800 (8 a.m.)

This schedule is active January 11, 2099 through January 31, 2099 only on weekdays (Mondays through Fridays). For each day that this schedule is active, it is in effect for the hours 5 p.m. to midnight, and midnight to 8 a.m. For example, this schedule is active each Monday morning from midnight to 8 a.m., as well as each Monday evening from 5 p.m. to midnight.

Scheduled controls

These are the scheduled controls in a resource group:

Start and Stop Date
These values specify the start and stop dates that this schedule should be active. The dates should be of the form YYYYMMDD and are inclusive.
Start and Stop Day
These values specify the start and stop days of the week that this schedule should be active. The days should be from 1 (Sunday) to 7 (Saturday) and are inclusive.
Start and Stop Time
These values specify the start and stop times that this schedule should be active. The times should be of the form HHMM and are inclusive.
Active?
This flag controls whether or not this resource group control schedule is active. Its value must be Y (to activate or enable) or N (to deactivate or disable). If the entire resource group is disabled, all scheduled controls are disabled. If the resource group is enabled, this flag is used to determine whether or not this particular schedule is enabled.
Use Service Unit Defaults Flag
If set to N only Cost Category A Service Unit estimates are used in preemptive governing. All Category B estimates are ignored and the SQL statement is processed. If set toY Cost Category A or B Service Unit estimates can be used.
Note:
Enable Query Analyzer, described below, must be set to 'Y' or 'S' and Service Units must be set greater than 0 for this value to have effect.
Max CPU Seconds (Prompt Limit)
In an online QMF session, if the CPU time for a QMF command exceeds this limit, a prompt dialog will occur between the user and QMF. (The cancel limit will be checked before the prompt limit is checked.) CPU time checking is only performed asynchronously; it will effectively be disabled if the common control Asynchronous Timer Interval is set to 0.
Max CPU Seconds (Cancel Limit)
For batch or online QMF, this value, expressed in CPU seconds, represents the maximum CPU time allowable for any command. If this value is exceeded, the command will be canceled. CPU time checking is only performed asynchronously; it will effectively be disabled if the common control Asynchronous Timer Interval is set to 0.
Max Rows Fetched (Prompt Limit)
In an online QMF session, if the rows fetched for a QMF command exceeds this limit, a prompt dialog will occur between the user and QMF. (The cancel limit will be checked before the prompt limit is checked.)
Max Rows Fetched (Cancel Limit)
For batch or online QMF, this value represents the maximum number of rows that may be fetched per command. If this value is exceeded, the command will be canceled.
Allow GRANT, REVOKE SQL? Allow CREATE, ALTER, DROP SQL? Allow INSERT, DELETE, UPDATE SQL?
A value of Y for any of these fields enables the type of SQL statement to be processed. A value of N disables or disallows the type of SQL statement. If N is specified and the user attempts to process the type of SQL statement, the command will be canceled.
Allow TSO/CICS Command? Allow EXPORT Command? Allow IMPORT Command? Allow SAVE DATA Command? Allow CONNECT Command?
A value of Y for any of these fields enables that type of QMF command to be processed. A value of N disables that type of QMF command. If N is specified and the user attempts to process that type of command, the command will be canceled.
Enable QMF Access?
A value of Y for this field allows access to QMF while the schedule is active. A value of N disallows access. You can enable access to online sessions independently of batch sessions.
Enable Query Analyzer?
A value of Y for this field causes Query Analyzer to automatically analyze all queries. A value of S allows selective analysis of queries. A value of N disables all query analysis.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004