DB2 SQLSTATE = 57014 error

6.5k views Asked by At

I am using Microsoft Visual Studio 2010. I am running code that includes several large queries accessing large amounts of data. On Friday when I debugged my code it was working properly with no errors. Upon returning today when I run the code 9 out of 10 times I get this error:

[DB2/NT64] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014

After doing some research into I have seen that QUERYTIMEOUTINTERVAL=0 can be added to the [Common] section in the db2cli.ini file. This will cause the CLI driver to wait for the execution of the query without timing out before returning to the application. This should resolve the problem I believe. Only problem is I cannot locate the db2cli.ini file. I am using a windows 7 operating system so I believe the file should be along this path:

C:\Program Files\IBM\SQLLIB\cfg

Only problem is when I enter the cfg file I do not see the db2cli.ini file. Any help would be greatly appreciated. Either on how to find this file and insert the querytimeoutinterval code or another way to resolve my issue. Thanks.

1

There are 1 answers

2
mustaccio On

db2cli.ini may not exist unless you have created it previously. There is a sample file to get you started, which should be in C:\ProgramData\IBM\DB2\driver_copy_name\cfg, as indicated in the manual.

You can also avoid editing the file manually -- open the DB2 command line and issue db2 update cli cfg for section common using QueryTimeoutInterval 0 (note that the keyword QueryTimeoutInterval is case-sensitive).