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,277 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Trigger or Function that updates table with old values 5 38
Select2 jquery help 9 74
SQL query to summarize items per month 5 53
If-Then-Else ASP problem 6 50
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

20 Experts available now in Live!

Get 1:1 Help Now