IBM Support

.NET application receives SQL0952N error for long running queries even though QUERYTIMEOUTINTERVAL=0 is set

Technote (troubleshooting)


Problem(Abstract)

.NET applications migrated from a previous version of DB2 to Version 9.7 now receives SQL0952N when executing a long running query even though QUERYTIMEOUTINTERVAL=0 is set in the db2cli.ini file

Symptom

In the previous versions of DB2, QUERYTIMEOUTINTERVAL=0 prevented the query from timing out in .NET. In DB2 Version 9.7, .NET applications now receive the following error even though QUERYTIMEOUTINTERVAL=0 is set in the db2cli.ini file:

SQL0952N Processing was cancelled due to an interrupt.


Cause

.NET applications no longer use the db2cli.ini file.

In previous versions, a CLI Keyword, QUERYTIMEOUTINTERVAL=0 would be coded to ignore the timeout value set by the application and allow the query to run without being terminated.

From V9.7, there is a new configuration file for .NET called db2dsdriver.cfg but is only used by the IBM Data Server Client or IBM Data Server Runtime Client.


Environment

All

Resolving the problem

To resolve the issue, the application should code QueryTimeout=0 in the connection string for the application.


QueryTimeout is defined as an integer, greater than or equal to 0, representing the interval between query timeout checks. The default value is 5 seconds. If the value is set to 0, the timeout value set by the application will be ignored and will allow the query to run until completion.

Starting in Version 9.7 fixpak 2, you can use the .NET configuration file, db2dsdriver.cfg, to code the QueryTimeout value.

If the intention is to maintain a timeout value, but would like to increase the timeout value, use the CommandTimeout property to set a larger value. The default timeout is 30 seconds.

Related information

QUERYTIMEOUTINTERVAL
QUERYTIMEOUT
SQL0952N
DB2DSDRIVER.CFG
CommandTimeout


Cross reference information
Segment Product Component Platform Version Edition
Information Management DB2 Connect Windows 9.7 DB2 Connect Application Server Edition, DB2 Connect Enterprise Edition, DB2 Connect Personal Edition, DB2 Connect Unlimited Edition for System i, DB2 Connect Unlimited Edition for System z

Document information

More support for: DB2 for Linux, UNIX and Windows
Programming Interface - .NET/.NET ADO

Software version: 9.7, 10.1, 10.5

Operating system(s): Windows

Software edition: Enterprise Server, Express, Personal, Personal Developer's, Workgroup Server

Reference #: 1450816

Modified date: 15 June 2016