IBM Books

DB2 Query Patroller User's Guide


Scheduling a Query

This chapter provides information and procedures for scheduling a query using the Schedule Query window.

To schedule a query using the Schedule Query window, perform the following steps:

  1. Use your 32-bit ODBC query application to submit a query.

    If the same query already exists in the job table, the Result Set window opens. Otherwise, the Schedule Query window opens. If the Schedule Query window opens, go to step 3.

  2. If the Result Set window opens, click Submit Query.

    The Schedule Query window opens.

  3. Choose an execution mode: immediate execution, deferred execution, or recurring query.

  4. Follow the instructions in the appropriate section below for the execution mode chosen.

Immediate Execution

To schedule a query for immediate execution, perform the following steps:

  1. Complete the instructions in Setting the Special Submission Options.

  2. Click Submit and Wait.
    Note:If you believe that the query is going to take a lot of time to complete or that the DB2 Query Patroller system is going to defer execution of the query based on its cost, click Submit and Release.

  3. Go to Waiting for Query Results.

Deferred Execution

To schedule a query for deferred execution, perform the following steps:

  1. Set the execution date and execution time on the Schedule Query window. See Setting Query Options for instructions on setting the execution date and time.

  2. Set the special submission options on the Schedule Query window. See Setting the Special Submission Options for instructions.

  3. Click Submit and Release.

  4. Go to Returning Query Results.

Scheduling a Recurring Query

To schedule a recurring query:

  1. Set the special submission options on the schedule Query window. See Setting the Special Submission Options for instructions.

  2. Click Schedule.

    The Recurring Query Scheduler window opens.

  3. Go to Scheduling a Recurring Query.

Setting Query Options

Depending on the query execution mode, you may need to set the execution date, the execution time, and the special submission options.

Setting the Execution Date

In the calendar section of the Schedule Query window, perform the following steps to set the execution date.

  1. Use the arrow push buttons above the calendar to select the month.

  2. Select a day of the month for the query to begin executing.

    The selected day displays darker than the other days in the month.

Setting the Execution Time

In the time section of the Schedule Query window, perform the following steps to set the execution time:

  1. Use the first set of up and down arrows to select the hour.
    Note:The a.m./p.m. designator cannot be set directly; it can only be set by setting the hour.

  2. Use the second set of up and down arrows to select the minute.

  3. Use the third set of up and down arrows to select the second.

Setting the Special Submission Options

In the special submission options section of the Schedule Query window, perform the following steps to set the special options.

  1. Select or deselect the Cost Analyze Query checkbox as needed.

  2. In the Priority field, select a priority from the drop-down list.

  3. In the Results Destinations field, select a result destination from the drop-down list.

  4. In the Query Name field, select a query name from the drop-down list. If needed, click Edit Names to add, delete, or edit a query name.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]