IBM Books

DB2 Query Patroller User's Guide


Returning Query Results

This chapter provides information and procedures for using the Result Set window. The following topics are covered:


Using the Result Set Window

When you submit a query, the QueryEnabler component checks for matching queries in the job table. If matching queries exist, the Result Set window opens. Matching queries are displayed in tabular format along with information such as job status, scheduling time, and completion time. This window refreshes periodically based on database activity. The Result Set window is illustrated below:
Figure Qe4 not displayed.

The table below contains a description of each column that displays in the Result Set window.


Table 2. Columns in the Select a Result Set Window
Column Name Description
Query Name The name of the query.
Job ID The unique job ID assigned by the DB2 Query Patroller system.
Job Status The status of the job, which can be: hold, done, queued, estimating, running, canceled, and aborted.
Table Name The name of the result table. N/A indicates that the table name is not available.
# Rows The number of result rows returned by the query.
Sched ID The schedule ID, which is the same for a group of recurring queries submitted simultaneously.
Date/Time Submitted The date and time the query was submitted.
Date/Time Scheduled The date and time the query is scheduled to run.
Date/Time Completed The date and time the query completed.
Results Destination The alternate result destination.
Error Status An error description, if the query was aborted.


Returning Query Results

To return the results of a previously submitted query, perform the following steps:

  1. In the Result Set window, select a query name.

  2. Click Return Results.

    The selected result set displays.
    Note:If a result set does not reside in DB2, the query name will appear in the list but the result set for that query name cannot be returned to the Result Set window.


Canceling an Individual Query

You can cancel an individual query that has not finished executing. To cancel an individual query, perform the following steps:

  1. In the Result Set window, select the query name with a status of estimating, queued, hold, or running.

  2. Click Cancel Query.
    Note:If the Cancel Query push button is not active, the selected query cannot be canceled.

Query Operations

The Query Operations push button on the Result Set window allows you to drop result tables and cancel individual queries and recurring queries. Clicking Query Operations displays the Query Operations window. The Query Operations window is illustrated below:
Select a Query Operation Window

Dropping a Table

You can drop a result table for an individual query, or for all queries with the same schedule ID. To drop a result table for a specific job, click the radio button labeled Drop result table with job ID <jobID>, and click OK.

To drop the result tables for all jobs for a specific schedule, click the radio button labeled Drop all result tables with schedule ID <scheduleID>, and click OK.

Canceling All Recurring Queries

You can cancel all recurring queries that have the same schedule ID. Only queries that have not completed processing can be canceled.

To cancel all recurring queries for a specific schedule, click the radio push button labeled Cancel all queries with schedule ID <scheduleID>, and click OK.

Canceling All Queries and Dropping All Tables in a Schedule ID

To cancel all queries and drop all result tables for a Schedule ID, click the radio button labeled Cancel all queries and drop all result tables with schedule ID <scheduleID>, and click OK.


Resubmitting a Query

To resubmit a previously executed query, click Submit Query on the Result Set window. Clicking Submit Query automatically displays the Schedule Query window. For information about using the Schedule Query window, see Scheduling a Query.


Exiting the Window

Use the Exit push button to exit the Result Set window.


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

[ DB2 List of Books | Search the DB2 Books ]