This chapter provides information and procedures for using the Result Set window. The following topics are covered:
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:
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. |
To return the results of a previously submitted query, perform the following steps:
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. |
You can cancel an individual query that has not finished executing. To cancel an individual query, perform the following steps:
Note: | If the Cancel Query push button is not active, the selected query cannot be canceled. |
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:
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.
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.
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.
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.
Use the Exit push button to exit the Result Set window.