Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsHi everyone,
Kinda puzzled here, hoping for a little input and/or ideas.
Every month I run a query from VB on a file created monthly for the previous month's data. Everything has been working fine up until this month, but something changed and now I'm getting an error (and the as400 admin doesn't know what caused it).
The error I'm getting is:
Run-time error '-2147467259 (80004005)':
[IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0666 - SQL query exceeds specified time limit or storage limit
I first thought maybe the data for November was larger than usual, but I got the same error when re-running it on October's data (which worked fine for me last month).
My query is actually querying a similar file in 5 libraries (ie. LIB01/FL200711, LIB02/FL200711, LIB03/FL200711, etc) with a UNION ALL between each lib's query, so I thought maybe that was creating the error. Breaking it down to 5 individual queries still causes the error.
The admin of the machine ran the CHGQRYA CL command (at least I think that is what she ran, that is what IBM's website says specifies the query time limit and temp storage limit) but said there are no limits ("nomax" i think she said).
I ran the same query in NGS (through the iSeries Access emulator) and it worked fine and without error.
My ODBC driver isn't the issue; I tried querying a different file in the same libraries and it worked fine.
I tried putting an OPTIMIZE FOR 2000 ROWS statement in there as well (the max one of my individual queries would be), no luck.
Because I'm running this query via ODBC, the admin says nothing is logging in my job log (my connection string does have my username) for it.
Some (sanitized) details, should you want to know:
My connection string:
ODBC;DSN=MYDSN;DRIVER={Cli
The SQL statement for one of these non-working queries:
SELECT digits(FIELD1)||digits(FIE
FROM LIB01.FL200711
WHERE (FIELD4 In (123,456,789)) AND (FIELD3<>'00')
GROUP BY FIELD1, FIELD2, FIELD3
Number of records in LIB01.FL200711: 1,780,319
Back in August the machine was upgraded to a "570"
Thanks for reading this far. I welcome any suggestions/advice/questio
Thanks
Matt
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: daveslashPosted on 2007-12-11 at 09:31:51ID: 20450913
Comments are available to members only. Sign up or Log in to view these comments.