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,286 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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