This chapter provides hints and tips for configuring DB2 Query Patroller Client applications.
The typical DB2 Query Patroller Client requires two DB2 Query Patroller components to be installed on their desktop. The QueryEnabler and the QueryMonitor. The QueryMonitor allows the user to manage queries. The QueryEnabler is the component of DB2 Query Patroller that traps the ODBC query.
From the perspective of the ODBC 32-bit query application, QueryEnabler is an ODBC driver. From the DB2 perspective, QueryEnabler is an ODBC application. When you are configuring an ODBC query application to access a DB2 data warehouse through QueryEnabler, keep this distinction in mind to avoid confusion between the DB2 data source name and QueryEnabler data source name. Configuring QueryEnabler involves the following tasks:
Note: | You should use a naming convention which easily distiguishes a DB2 data source name from a DB2 Query Patroller data source name. |
If a connection can not be established for the ODBC query application using the DB2 Query Patroller defined data source name, a connection using the DB2 data source name should be attempted. Once the DB2 connection is successful, try a connection to DB2 Query Patroller once again.
Note: | Other DB2 Query Patroller client-side tools, such as QueryMonitor, use the DB2 alias to access the data warehouse. If you have specified the DB2 Query Patroller ODBC data source name with these tools, the QueryEnabler scheduling window will open when you submit a query. |
The DB2 Query Patroller client has several configuration options that control the operational semantics of the queries that it submits. These configuration options can be modified in the file DB2IWM.INI in the Windows install directory. The configuration options are:
This option specifies the maximum number of rows that will be returned in the answer set. If this value is set to 0, the complete answer set will be returned.
This option specifies the maximum number of seconds the query will be permitted to run against the DB2 Query Patroller server. If this value is set to 0 or -1 the query will always run to completion.
This option is provided to allow queries to be posted to the DB2 Query Patroller server without requiring user intervention. This environment variable can be set to one of two values:
When the DB2_IWM_SUBMITWAIT variable is set to RUN, queries will be submitted to the DB2 Query Patroller server in a Submit and Wait mode. A user dialog is not required. The RUN value has a time out option: RUN: <timeout>. This option is in units of seconds. If this option is not set, QueryEnabler will wait until the query has been processed before returning control to the query application.
When the DB2_IWM_SUBMITWAIT variable is set to CHECK, it will behave similarly to RUN, but in this case, DB2 Query Patroller will check to determine if an answer set exists for the query. If an answer set does exist, that result set will be returned, as opposed to the same query being executed again. The CHECK value has a time out option: CHECK: <timeout>. This option is in units of seconds. If this option is not set, QueryEnabler will wait until the query has been processed before returning control to the query application.
Note: | The default value for the n-tier option is OFF. |