Solved

SQL 2005: The query processor ran out of internal resources and could not produce a query plan.

Posted on 2010-08-24
6
1,265 Views
Last Modified: 2012-06-27
Hi There,

I have a simple Classic ASP recordset that inserts some data into a simple table (5 cols) (SQL 2005)

The complication in the artitecture is that the table forms part of the strucutre for about 350 indexed views (standard and full text), although only affects one of these views based on teh value of one of the columns in the table.

Im getting this error:

Microsoft SQL Native Client error '80004005'

The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.

If I insert the same data using a SQL insert statement via SSMS it goes in. I have also had a look at the execution plan for this query and it is quite complex and referrs back to the indexes on one of the views and a linked table via in the view, but is not that complex.

It has been working up until now.

Another random one was that there was disk space issues on this server this morning which have been resolved.

i have a hunch that an SQL restart, or server restart may solve this issue. However cannot afford the downtime right now.

URGENT advice appreciated.

Thanks.
0
Comment
Question by:jazzer102
  • 4
  • 2
6 Comments
 
LVL 12

Accepted Solution

by:
mcv22 earned 500 total points
ID: 33509323
What is the latest service pack applied to SQL server? Is this applicable : http://support.microsoft.com/kb/917888
0
 

Author Comment

by:jazzer102
ID: 33509362
SQL 2005 version is 9.00.4035.00 - SP3 - Developer Edition

Hotfix sounds like it should apply but they only provide it for RTM and SP1

What do you think?
0
 
LVL 12

Assisted Solution

by:mcv22
mcv22 earned 500 total points
ID: 33509441
Don't think it applies, since it was included as part of SP2 and you're already at SP3

Try upgrading to the latest cumulative update - http://support.microsoft.com/kb/2258854
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:jazzer102
ID: 33509671
Thanks for this, I have bypassed the issue but using an ADODB Command and insert statment to put the data in. This is better practice anyway.

I am a bit nervous about adding the above hotfixes when they dont directly relate to the issue. And cant afford any downtime at this point.

Also Im becoming increasingly suspicious of MS service packs that "include" previous hotfixes for errors that happen exactly as the hotfix describes, but shouldnt happen as you have as SP that "covers" the issue. This is not the first time this I have come accross this situation within SQL 2005.
0
 

Author Closing Comment

by:jazzer102
ID: 33510150
This seems like it should be the best fix for the problem, also see my final commnet regarding my workaround.
0
 

Author Comment

by:jazzer102
ID: 33520834
Further Info:

Tried to resolve by installing latest Cumalative Update and this does NOT resolve the issue.

Cant install the hotfix in the first reply as on SP3 and this is only for SP1
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now