IBM Support

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

Troubleshooting


Problem

.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.

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Programming Interface - .NET\/.NET ADO","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1;10.5","Edition":"Enterprise Server;Express;Personal;Personal Developer's;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSEPDU","label":"DB2 Connect"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.7","Edition":"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","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 June 2018

UID

swg21450816