Setting the execution timeout
Some reports are capable of firing quite resource-consuming queries on the data source. This can cause a bottleneck on the database and hence a problem for other users and jobs. This recipe will show you how to automatically get the report query killed if it takes longer than a certain time limit.
Getting ready
Create a simple list report based on the GO Data Warehouse (query) package. Pull Product line
, Product type
, and Product
as columns.
How to do it...
In this recipe we will learn how to set the execution timeout for a query. To do this, perform the following steps:
Open the report in Cognos Report Studio.
Go to Query Explorer and select Query1.
From the Properties pane, open the Maximum Execution Time property.
Set it to a low number. For testing, we will set it to
1
, as shown in the following screenshot:That means we are setting the maximum execution time for the query to one second.
Run the report to test it. In most cases, this will cross the threshold of one...