
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DB2 - SQL0666 SQL query exceeds specified time limit or storage limit
Hi there,
I currently have an issue with a replicate task (DB2 for iSeries to SQL Server), returning the following error:
sql0666 sql query exceeds specified time limit or storage limit
In DB2 I have the "QQRYTIMLMT" set to "*NOMAX".
Everything that I've found relating to this error, says to adjust some settings in the ODBC data source, but I don't have anything listed in ODBC data source administrator > system DSN.
Other tasks using the same endpoints, but different tables are working great.
If anyone has some tip, I would appreciate it.
Thanks a lot.
Best regards,
- Tags:
- Replicate
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are many reasons may lead this error, you can try something:
1. You can see in user guide the limitation "Row size cannot exceed 32740 bytes". Check your row size.
2. Set internal parameter "executeTimeout" to a reasonable long time (depend on how long you got the error) in the source endpoint
3. create a ODBC DSN manaually and Turn off the checkmark in the Allow Query Timeout checkbox
and then use the ODBC DSN in source endpoint. Some helpful links
http://vijirajkumar.blogspot.com/2009/12/error-hy000-ibmiseries-access-odbc.html
https://www.ibm.com/support/pages/node/641523
Try that and let us know if it's helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are many reasons may lead this error, you can try something:
1. You can see in user guide the limitation "Row size cannot exceed 32740 bytes". Check your row size.
2. Set internal parameter "executeTimeout" to a reasonable long time (depend on how long you got the error) in the source endpoint
3. create a ODBC DSN manaually and Turn off the checkmark in the Allow Query Timeout checkbox
and then use the ODBC DSN in source endpoint. Some helpful links
http://vijirajkumar.blogspot.com/2009/12/error-hy000-ibmiseries-access-odbc.html
https://www.ibm.com/support/pages/node/641523
Try that and let us know if it's helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for the post to the QDI Forums. I would have the DB2i DBA check the QZDASOINIT Initialization job that starts on the DB2i Source to see if there is a failure on the Source side too. The INIT job is for the SQL and ODBC connection to the DB along with John's suggestion on the ODBC client. Hope this helps and please post if the information provided helped with the post.
Thanks!
Bill

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi john,
error : "SQL query exceeds specified limit or threshold. Failed (retcode -1) to execute statement"
Source : IBM DB2 for iseries
Task : Logstream Task
so ,
Settings are applied as per this http://vijirajkumar.blogspot.com/2009/12/error-hy000-ibmiseries-access-odbc.html doc for query timeout then it should be error for to many selection of tables in one task ?
Thanks,
Harsh Patel
