Advertisement

12.11.2007 at 09:09AM PST, ID: 23016025
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

SQL error while querying an AS400 file from VB (ODBC)

Tags: limit, exceeds, storage, query, odbc
Hi 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={Client Access ODBC Driver (32-bit)};SYSTEM=THESYSTEM.DOMAIN.COM;COMMANDTIMEOUT=0;Uid=MVIDAS;Pwd=********;

The SQL statement for one of these non-working queries:
SELECT digits(FIELD1)||digits(FIELD2), FIELD3, COUNT(*)
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/questions/etc!
Thanks
Matt
Start your free trial to view this solution
Question Stats
Zone: OS
Question Asked By: mvidas
Solution Provided By: daveslash
Participating Experts: 1
Solution Grade: A
Views: 124
Translate:
Loading Advertisement...
12.11.2007 at 09:31AM PST, ID: 20450913

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.11.2007 at 10:05AM PST, ID: 20451182

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_EXPERT_20070906